You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pn...@apache.org on 2015/07/04 13:20:54 UTC

[02/16] celix git commit: CELIX-234: prevent re-setting while reading bundle state

CELIX-234: prevent re-setting while reading bundle state


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/e2598c11
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/e2598c11
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/e2598c11

Branch: refs/heads/feature/CELIX-237_rsa-ffi
Commit: e2598c11ab41c401fb4187a49fc77cf55a9976e6
Parents: 48e036c
Author: Bjoern Petri <bp...@apache.org>
Authored: Fri May 15 18:09:08 2015 +0200
Committer: Bjoern Petri <bp...@apache.org>
Committed: Fri May 15 18:09:08 2015 +0200

----------------------------------------------------------------------
 framework/private/src/framework.c | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/e2598c11/framework/private/src/framework.c
----------------------------------------------------------------------
diff --git a/framework/private/src/framework.c b/framework/private/src/framework.c
index 95c86e6..3032396 100644
--- a/framework/private/src/framework.c
+++ b/framework/private/src/framework.c
@@ -2230,6 +2230,10 @@ static void *fw_eventDispatcher(void *fw) {
 			if (celixThreadMutex_lock(&framework->bundleListenerLock) != CELIX_SUCCESS) {
 				status = CELIX_FRAMEWORK_EXCEPTION;
 			}
+			else if (celixThreadMutex_lock(&framework->bundleLock) != CELIX_SUCCESS) {
+				celixThreadMutex_unlock(&framework->bundleListenerLock);
+				status = CELIX_FRAMEWORK_EXCEPTION;
+			}
 			else {
 				int i;
 				int size = arrayList_size(request->listeners);
@@ -2257,6 +2261,10 @@ static void *fw_eventDispatcher(void *fw) {
 					}
 				}
 
+				if (celixThreadMutex_unlock(&framework->bundleLock)) {
+					status = CELIX_FRAMEWORK_EXCEPTION;
+				}
+
 				if (celixThreadMutex_unlock(&framework->bundleListenerLock)) {
 					status = CELIX_FRAMEWORK_EXCEPTION;
 				}