PengZheng commented on code in PR #476:
URL: https://github.com/apache/celix/pull/476#discussion_r1115217749


##########
libs/framework/src/framework_bundle_lifecycle_handler.c:
##########
@@ -83,31 +90,32 @@ void 
celix_framework_cleanupBundleLifecycleHandlers(celix_framework_t* fw, bool
     celixThreadMutex_unlock(&fw->bundleLifecycleHandling.mutex);
 }
 
-static void 
celix_framework_createAndStartBundleLifecycleHandler(celix_framework_t* fw, 
celix_framework_bundle_entry_t* bndEntry, enum celix_bundle_lifecycle_command 
bndCommand) {
+static void 
celix_framework_createAndStartBundleLifecycleHandler(celix_framework_t* fw, 
celix_framework_bundle_entry_t* bndEntry, enum celix_bundle_lifecycle_command 
bndCommand, const char* updatedBundleUrl) {
     celix_framework_bundleEntry_increaseUseCount(bndEntry);
     celixThreadMutex_lock(&fw->bundleLifecycleHandling.mutex);
     celix_framework_bundle_lifecycle_handler_t* handler = calloc(1, 
sizeof(*handler));
     handler->command = bndCommand;
     handler->framework = fw;
     handler->bndEntry = bndEntry;
     handler->bndId = bndEntry->bndId;
+    handler->updatedBundleUrl = celix_utils_strdup(updatedBundleUrl);
     celix_arrayList_add(fw->bundleLifecycleHandling.bundleLifecycleHandlers, 
handler);
 
     fw_log(fw->logger, CELIX_LOG_LEVEL_TRACE, "Creating thread for %s bundle 
%li",
            celix_bundleLifecycleCommand_getDesc(handler->command) , 
handler->bndId);
-    celixThread_create(&handler->thread, NULL, 
celix_framework_stopStartBundleThread, handler);
+    celixThread_create(&handler->thread, NULL, 
celix_framework_BundleLifecycleHandlingThread, handler);

Review Comment:
   A commit is submitted to cleanup handlers as soon as they finish their jobs.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to