Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Race Condition and ABBA Deadlock #645

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 4 additions & 7 deletions libs/framework/src/dm_dependency_manager_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,6 @@ celix_array_list_t * celix_dependencyManager_createInfos(celix_dependency_manage
static void celix_dm_allComponentsActiveCallback(void *handle, const celix_bundle_t *bnd) {
bool *allActivePtr = handle;

if (celix_bundle_getState(bnd) != CELIX_BUNDLE_STATE_ACTIVE) {
return;
}

celix_bundle_context_t *context = NULL;
bundle_getContext((celix_bundle_t*)bnd, &context);
celix_dependency_manager_t *mng = celix_bundleContext_getDependencyManager(context);
Expand All @@ -274,9 +270,10 @@ static void celix_dm_allComponentsActiveCallback(void *handle, const celix_bundl
}

bool celix_dependencyManager_allComponentsActive(celix_dependency_manager_t *manager) {
bool allActive = true;
celix_bundleContext_useBundles(manager->ctx, &allActive, celix_dm_allComponentsActiveCallback);
return allActive;
bool allActive = true;
celix_framework_t* fw = celix_bundleContext_getFramework(manager->ctx);
celix_framework_useActiveBundles(fw, true, &allActive, celix_dm_allComponentsActiveCallback);
return allActive;
}

size_t celix_dependencyManager_nrOfComponents(celix_dependency_manager_t *mng) {
Expand Down