diff --git a/src/Makefile.am b/src/Makefile.am index 74b5244a..e6e1e128 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -12,14 +12,17 @@ remotedebuggerincludedir = $(includedir)/rrd remotedebuggerinclude_HEADERS = rrdCommon.h rrdInterface.h \ rrd_archive.h rrd_config.h rrd_logproc.h rrd_sysinfo.h rrd_upload.h -remotedebugger_SOURCES = rrdMain.c rrdEventProcess.c rrdJsonParser.c rrdRunCmdThread.c rrdCommandSanity.c rrdDynamic.c rrdExecuteScript.c rrdMsgPackDecoder.c rrdInterface.c uploadRRDLogs.c rrd_config.c rrd_sysinfo.c rrd_logproc.c rrd_archive.c rrd_upload.c - +remotedebugger_SOURCES = rrdMain.c rrdEventProcess.c rrdJsonParser.c rrdRunCmdThread.c rrdCommandSanity.c rrdDynamic.c rrdExecuteScript.c rrdMsgPackDecoder.c rrdInterface.c remotedebugger_CFLAGS = -I$(top_srcdir)/include/rrd -I$(PKG_CONFIG_SYSROOT_DIR)${includedir}/trower-base64/ -I$(PKG_CONFIG_SYSROOT_DIR)${includedir}/rbus/ -I$(PKG_CONFIG_SYSROOT_DIR)${includedir} $(CJSON_CFLAGS) AM_LDFLAGS="-lpthread -lrdkloggers -lmsgpackc -ltrower-base64 -lwebconfig_framework -lrbus -lsecure_wrapper " -remotedebugger_LDADD = -lfwutils -luploadstblogs -lz + if IARMBUS_ENABLE -remotedebugger_SOURCES += rrdIarmEvents.c +remotedebugger_SOURCES += rrdIarmEvents.c uploadRRDLogs.c rrd_config.c rrd_sysinfo.c rrd_logproc.c rrd_archive.c rrd_upload.c remotedebugger_CFLAGS += -I$(PKG_CONFIG_SYSROOT_DIR)${includedir}/rdk/iarmbus/ -I$(PKG_CONFIG_SYSROOT_DIR)${includedir}/rdk/iarmmgrs/rdmmgr -I$(PKG_CONFIG_SYSROOT_DIR)${includedir}/rdk/iarmmgrs-hal -DIARMBUS_SUPPORT AM_LDFLAGS += "-lIARMBus -lrfcapi -ltr181api" endif -remotedebugger_LDFLAGS = $(AM_LDFLAGS) $(CJSON_LDFLAGS) $(CJSON_LIBS) -luploadstblogs -fno-common +remotedebugger_LDFLAGS = $(AM_LDFLAGS) $(CJSON_LDFLAGS) $(CJSON_LIBS) -fno-common +if IARMBUS_ENABLE +remotedebugger_LDFLAGS += -luploadstblogs +remotedebugger_LDADD = -lfwutils -lz -luploadstblogs +endif diff --git a/src/rrdExecuteScript.c b/src/rrdExecuteScript.c index 102c22ec..0c5c2f11 100644 --- a/src/rrdExecuteScript.c +++ b/src/rrdExecuteScript.c @@ -18,6 +18,7 @@ */ #include "rrdExecuteScript.h" +#define RRD_SCRIPT "/lib/rdk/uploadRRDLogs.sh" #if !defined(GTEST_ENABLE) #include "secure_wrapper.h" #endif @@ -38,6 +39,7 @@ int uploadDebugoutput(char *outdir, char *issuename) if(outdir != NULL && issuename != NULL) { normalizeIssueName(issuename); +#ifdef IARMBUS_SUPPORT RDK_LOG(RDK_LOG_INFO,LOG_REMDEBUG,"[%s:%d]: Starting Upload Debug output via API... \n",__FUNCTION__,__LINE__); ret = rrd_upload_orchestrate(outdir, issuename); @@ -49,6 +51,13 @@ int uploadDebugoutput(char *outdir, char *issuename) { RDK_LOG(RDK_LOG_INFO,LOG_REMDEBUG,"[%s:%d]: Upload orchestration completed successfully\n",__FUNCTION__,__LINE__); } +#else + RDK_LOG(RDK_LOG_INFO,LOG_REMDEBUG,"[%s:%d]: Starting Upload Debug output Script: %s... \n",__FUNCTION__,__LINE__,RRD_SCRIPT); + if(v_secure_system("%s %s %s",RRD_SCRIPT,outdir,issuename) != 0) + { + ret = 1; + } +#endif } return ret; diff --git a/src/rrd_upload.h b/src/rrd_upload.h index 96a1a3d5..6eebfcbe 100644 --- a/src/rrd_upload.h +++ b/src/rrd_upload.h @@ -25,8 +25,10 @@ #include #include "rrdCommon.h" #ifndef GTEST_ENABLE +#ifdef IARMBUS_SUPPORT #include #endif +#endif #ifdef __cplusplus extern "C" {