celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject celix git commit: CELIX-349: Fixes an issue service tracker that the service reference list was updated after the added callback was invoked.
Date Wed, 10 Feb 2016 11:23:53 GMT
Repository: celix
Updated Branches:
  refs/heads/develop a303b7984 -> d4fe6558d


CELIX-349: Fixes an issue service tracker that the service reference list was updated after
the added callback was invoked.


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

Branch: refs/heads/develop
Commit: d4fe6558d214f24fbda1d0b7747e348d6fdeb451
Parents: a303b79
Author: Pepijn Noltes <pepijnnoltes@gmail.com>
Authored: Wed Feb 10 12:22:15 2016 +0100
Committer: Pepijn Noltes <pepijnnoltes@gmail.com>
Committed: Wed Feb 10 12:22:15 2016 +0100

----------------------------------------------------------------------
 framework/private/src/service_tracker.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/d4fe6558/framework/private/src/service_tracker.c
----------------------------------------------------------------------
diff --git a/framework/private/src/service_tracker.c b/framework/private/src/service_tracker.c
index 42ac254..92c3a92 100644
--- a/framework/private/src/service_tracker.c
+++ b/framework/private/src/service_tracker.c
@@ -301,10 +301,12 @@ static celix_status_t serviceTracker_track(service_tracker_pt tracker,
service_r
                 assert(reference != NULL);
                 tracked->reference = reference;
                 tracked->service = service;
-                serviceTracker_invokeAddService(tracker, reference, service);
+
                 celixThreadRwlock_writeLock(&tracker->lock);
                 arrayList_add(tracker->trackedServices, tracked);
                 celixThreadRwlock_unlock(&tracker->lock);
+
+                serviceTracker_invokeAddService(tracker, reference, service);
             }
         }
 


Mime
View raw message