This is an automated email from the ASF dual-hosted git repository.
pengzheng pushed a commit to branch
hotfix/653-test_cxx_remote_services_integration-crash
in repository https://gitbox.apache.org/repos/asf/celix.git
The following commit(s) were added to
refs/heads/hotfix/653-test_cxx_remote_services_integration-crash by this push:
new 4e15eaf7 Revert 6bb8de5 to avoid breaking
test_cxx_remote_services_integration.
4e15eaf7 is described below
commit 4e15eaf779613573d45ad0dc6e97dec40123cb52
Author: PengZheng <[email protected]>
AuthorDate: Sun Sep 24 18:20:08 2023 +0800
Revert 6bb8de5 to avoid breaking test_cxx_remote_services_integration.
---
libs/framework/src/framework.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/libs/framework/src/framework.c b/libs/framework/src/framework.c
index fc61a53b..88e2224e 100644
--- a/libs/framework/src/framework.c
+++ b/libs/framework/src/framework.c
@@ -1113,6 +1113,14 @@ static void* framework_shutdown(void *framework) {
celixThreadMutex_unlock(&fw->installedBundles.mutex);
size = celix_arrayList_size(stopEntries);
+ for (int i = size-1; i >= 0; --i) { //note loop in reverse order -> stop
later installed bundle first
+ celix_framework_bundle_entry_t *entry =
celix_arrayList_get(stopEntries, i);
+
+ bundle_state_e state = celix_bundle_getState(entry->bnd);
+ if (state == CELIX_BUNDLE_STATE_ACTIVE || state ==
CELIX_BUNDLE_STATE_STARTING) {
+ celix_framework_stopBundleEntry(fw, entry);
+ }
+ }
for (int i = size-1; i >= 0; --i) { //note loop in reverse order ->
uninstall later installed bundle first
celix_framework_bundle_entry_t *entry =
celix_arrayList_get(stopEntries, i);
celix_framework_uninstallBundleEntry(fw, entry, false);