diff --git a/Makefile.am b/Makefile.am index 58363925..a81d456e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -174,10 +174,12 @@ include_HEADERS = \ ${top_srcdir}/src/rbusInterface/rbusInterface.h \ ${top_srcdir}/src/include/device_status_helper.h -# ======================================================================== -# librdkFwupdateMgr - Wrapper library -# Includes async CheckForUpdate API implementation (Phase 1-5 complete) -# ======================================================================== +# Shared/common headers not tied to specific libraries +include_HEADERS = \ + ${top_srcdir}/src/rbusInterface/rbusInterface.h \ + ${top_srcdir}/src/include/device_status_helper.h + +bin_PROGRAMS= rdkvfwupgrader librdkFwupdateMgr_la_SOURCES = \ ${top_srcdir}/librdkFwupdateMgr/src/rdkFwupdateMgr_process.c \ @@ -212,64 +214,9 @@ rdkvfwupgrader_SOURCES = \ rdkvfwupgrader_LDADD = librdksw_jsonparse.la librdksw_upgrade.la librdksw_rfcIntf.la librdksw_iarmIntf.la librdksw_flash.la librdksw_fwutils.la $(cjson_LIBS) $(curl_LIBS) -lrdkloggers -ldwnlutil -lfwutils -lsecure_wrapper -lparsejson -lpthread -lrbus rdkvfwupgrader_LDFLAGS = -L$(PKG_CONFIG_SYSROOT_DIR)/$(libdir) -rdkvfwupgrader_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/src/include -I${top_srcdir}/src/deviceutils +rdkvfwupgrader_CFLAGS = -I${top_srcdir}/src/include -I${top_srcdir}/src/deviceutils rdkvfwupgrader_CPPFLAGS = -I${top_srcdir}/src/include -I${top_srcdir}/src/deviceutils -# D-Bus daemon binary - always build (removed conditional compilation) -rdkFwupdateMgr_SOURCES = \ - ${top_srcdir}/src/rdkFwupdateMgr.c\ - ${top_srcdir}/src/chunk.c \ - ${top_srcdir}/src/device_status_helper.c \ - ${top_srcdir}/src/rbusInterface/rbusInterface.c \ - ${top_srcdir}/src/dbus/rdkv_dbus_server.c \ - ${top_srcdir}/src/dbus/rdkFwupdateMgr_handlers.c \ - ${top_srcdir}/src/dbus/xconf_comm_status.c - -# Link against the RDK upgrade shared library AND new interface libraries -rdkFwupdateMgr_LDADD = librdksw_jsonparse.la librdksw_upgrade.la librdksw_rfcIntf.la librdksw_iarmIntf.la librdksw_flash.la librdksw_fwutils.la $(cjson_LIBS) $(curl_LIBS) -lrdkloggers -ldwnlutil -lfwutils -lsecure_wrapper -lparsejson -lpthread -lrbus $(GLIB_LIBS) - -rdkFwupdateMgr_LDFLAGS = -L$(PKG_CONFIG_SYSROOT_DIR)/$(libdir) -rdkFwupdateMgr_include_HEADERS = \ - ${top_srcdir}/src/dbus/rdkv_dbus_server.h \ - ${top_srcdir}/src/dbus/rdkFwupdateMgr_handlers.h \ - ${top_srcdir}/src/dbus/xconf_comm_status.h - -rdkFwupdateMgr_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/src/include -I${top_srcdir}/src/deviceutils -I${top_srcdir}/src/dbus $(GLIB_CFLAGS) -rdkFwupdateMgr_CPPFLAGS = -I${top_srcdir}/src/include -I${top_srcdir}/src/deviceutils -I${top_srcdir}/src/dbus $(GLIB_CFLAGS) - -rdkFwupdateMgr_includedir = ${includedir} - -# Test client binary - always build (removed conditional compilation) -testClient_SOURCES = \ - ${top_srcdir}/src/test/testClient.c - -# Test client needs explicit GLib/GDBus linking for ARM cross-compilation -testClient_LDADD = $(GLIB_LIBS) -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lpthread -testClient_LDFLAGS = -L$(PKG_CONFIG_SYSROOT_DIR)/$(libdir) -testClient_CFLAGS = $(GLIB_CFLAGS) -Wall -testClient_CPPFLAGS = $(GLIB_CFLAGS) - - -# Build and install the example_plugin binary -bin_PROGRAMS += example_plugin - -example_plugin_SOURCES = \ - ${top_srcdir}/librdkFwupdateMgr/examples/example_app.c - -example_plugin_CFLAGS = \ - -I${top_srcdir}/librdkFwupdateMgr/include \ - $(AM_CFLAGS) \ - $(GLIB_CFLAGS) - -example_plugin_LDADD = \ - librdkFwupdateMgr.la \ - $(GLIB_LIBS) \ - -lpthread - -example_plugin_LDFLAGS = \ - -L$(PKG_CONFIG_SYSROOT_DIR)/$(libdir) - - if INSTALL_TEST_FWUPGRADER bin_PROGRAMS += testrdkvfwupgrader diff --git a/src/rdkv_upgrade.c b/src/rdkv_upgrade.c index 71fe70b4..c1483dec 100755 --- a/src/rdkv_upgrade.c +++ b/src/rdkv_upgrade.c @@ -787,10 +787,10 @@ int codebigdownloadFile( } else { setDwnlState(RDKV_FWDNLD_DOWNLOAD_INIT); } - if (curl != NULL) { - *curl = doCurlInit(); - } - if (curl != NULL && *curl != NULL) { + if (curl != NULL) { + *curl = doCurlInit(); + } + if (curl != NULL && *curl != NULL) { if (server_type == HTTP_XCONF_CODEBIG) { setDwnlState(RDKV_XCONF_FWDNLD_DOWNLOAD_INPROGRESS); } else { @@ -803,10 +803,10 @@ int codebigdownloadFile( setDwnlState(RDKV_FWDNLD_DOWNLOAD_EXIT); } doStopDownload(*curl); - *curl = NULL; - if (force_exit != NULL && *force_exit == 1 && (curl_ret_code == 23)) { - SWLOG_INFO("%s : Force exit after codebig download (curl error 23)\n", __FUNCTION__); - return RDKV_UPGRADE_ERROR_FORCE_EXIT; + *curl = NULL; + if (*force_exit == 1 && (curl_ret_code == 23)) { + uninitialize(INITIAL_VALIDATION_SUCCESS); + exit(1); } }