You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by bp...@apache.org on 2014/09/10 07:42:44 UTC
svn commit: r1623907 - /celix/trunk/framework/private/src/framework.c
Author: bpetri
Date: Wed Sep 10 05:42:44 2014
New Revision: 1623907
URL: http://svn.apache.org/r1623907
Log:
CELIX-146
replaced some more printf-calls with fw_log-calls
Modified:
celix/trunk/framework/private/src/framework.c
Modified: celix/trunk/framework/private/src/framework.c
URL: http://svn.apache.org/viewvc/celix/trunk/framework/private/src/framework.c?rev=1623907&r1=1623906&r2=1623907&view=diff
==============================================================================
--- celix/trunk/framework/private/src/framework.c (original)
+++ celix/trunk/framework/private/src/framework.c Wed Sep 10 05:42:44 2014
@@ -1971,14 +1971,18 @@ celix_status_t framework_waitForStop(fra
static void *framework_shutdown(void *framework) {
framework_pt fw = (framework_pt) framework;
- hash_map_iterator_pt iterator;
+ hash_map_values_pt values = NULL;
+ bundle_pt **installedBundleArray;
+ unsigned int size;
int err;
+ int i;
fw_log(fw->logger, OSGI_FRAMEWORK_LOG_INFO, "FRAMEWORK: Shutdown");
+ values = hashMapValues_create(fw->installedBundleMap);
+ hashMapValues_toArray(values, (void*) &installedBundleArray, &size);
- iterator = hashMapIterator_create(fw->installedBundleMap);
- while (hashMapIterator_hasNext(iterator)) {
- bundle_pt bundle = (bundle_pt) hashMapIterator_nextValue(iterator);
+ for(i = 0; i < size; i++) {
+ bundle_pt bundle = (bundle_pt) installedBundleArray[i];
bundle_state_e state;
bundle_getState(bundle, &state);
if (state == OSGI_FRAMEWORK_BUNDLE_ACTIVE || state == OSGI_FRAMEWORK_BUNDLE_STARTING) {
@@ -1990,7 +1994,6 @@ static void *framework_shutdown(void *fr
fw_stopBundle(fw, bundle, 0);
}
}
- hashMapIterator_destroy(iterator);
err = celixThreadMutex_lock(&fw->mutex);
if (err != 0) {