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/11/17 13:52:28 UTC

celix git commit: CELIX-273: Add missing serviceTracker_stop call in export_registration_dfi.c

Repository: celix
Updated Branches:
  refs/heads/develop 61b082893 -> 00284f5d2


CELIX-273: Add missing serviceTracker_stop call in export_registration_dfi.c


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

Branch: refs/heads/develop
Commit: 00284f5d21e75dc0e8dda540e1ea54ed8e96c77d
Parents: 61b0828
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Tue Nov 17 13:51:43 2015 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Tue Nov 17 13:51:43 2015 +0100

----------------------------------------------------------------------
 .../rsa/private/src/export_registration_dfi.c     | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/00284f5d/remote_services/remote_service_admin_dfi/rsa/private/src/export_registration_dfi.c
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/rsa/private/src/export_registration_dfi.c b/remote_services/remote_service_admin_dfi/rsa/private/src/export_registration_dfi.c
index 7ef0daf..de083c1 100644
--- a/remote_services/remote_service_admin_dfi/rsa/private/src/export_registration_dfi.c
+++ b/remote_services/remote_service_admin_dfi/rsa/private/src/export_registration_dfi.c
@@ -174,6 +174,16 @@ celix_status_t exportRegistration_start(export_registration_pt reg) {
     return status;
 }
 
+
+celix_status_t exportRegistration_stop(export_registration_pt reg) {
+    celix_status_t status = CELIX_SUCCESS;
+    if (status == CELIX_SUCCESS) {
+        status = bundleContext_ungetServiceReference(reg->context, reg->exportReference.reference);
+        serviceTracker_close(reg->tracker);
+    }
+    return status;
+}
+
 static void exportRegistration_addServ(export_registration_pt reg, service_reference_pt ref, void *service) {
     celixThreadMutex_lock(&reg->mutex);
     reg->service = service;
@@ -188,14 +198,6 @@ static void exportRegistration_removeServ(export_registration_pt reg, service_re
     celixThreadMutex_unlock(&reg->mutex);
 }
 
-celix_status_t exportRegistration_stop(export_registration_pt reg) {
-    celix_status_t status = CELIX_SUCCESS;
-    if (status == CELIX_SUCCESS) {
-        bundleContext_ungetServiceReference(reg->context, reg->exportReference.reference);
-    }
-    return status;
-}
-
 celix_status_t exportRegistration_close(export_registration_pt reg) {
     celix_status_t status = CELIX_SUCCESS;
     exportRegistration_stop(reg);