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-350: Fixes wrong handling of shell service refernce in the shell_tui
Date Wed, 10 Feb 2016 11:46:50 GMT
Repository: celix
Updated Branches:
  refs/heads/develop d4fe6558d -> e3e6d1a4e


CELIX-350: Fixes wrong handling of shell service refernce in the shell_tui


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

Branch: refs/heads/develop
Commit: e3e6d1a4e637015f87bf454db3cad0867b55a439
Parents: d4fe655
Author: Pepijn Noltes <pepijnnoltes@gmail.com>
Authored: Wed Feb 10 12:46:03 2016 +0100
Committer: Pepijn Noltes <pepijnnoltes@gmail.com>
Committed: Wed Feb 10 12:46:03 2016 +0100

----------------------------------------------------------------------
 shell_tui/private/src/activator.c | 3 ---
 shell_tui/private/src/shell_tui.c | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/e3e6d1a4/shell_tui/private/src/activator.c
----------------------------------------------------------------------
diff --git a/shell_tui/private/src/activator.c b/shell_tui/private/src/activator.c
index ee03b30..1e79bea 100644
--- a/shell_tui/private/src/activator.c
+++ b/shell_tui/private/src/activator.c
@@ -74,9 +74,6 @@ celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context)
 	celix_status_t status;
 	shell_tui_activator_pt activator = (shell_tui_activator_pt) userData;
 
-	bundleContext_ungetService(activator->context,activator->reference,NULL);
-	bundleContext_ungetServiceReference(activator->context,activator->reference);
-
 	status = bundleContext_removeServiceListener(context, activator->listener);
 
 	if (status == CELIX_SUCCESS) {

http://git-wip-us.apache.org/repos/asf/celix/blob/e3e6d1a4/shell_tui/private/src/shell_tui.c
----------------------------------------------------------------------
diff --git a/shell_tui/private/src/shell_tui.c b/shell_tui/private/src/shell_tui.c
index fd5b62c..08bc3f8 100644
--- a/shell_tui/private/src/shell_tui.c
+++ b/shell_tui/private/src/shell_tui.c
@@ -111,10 +111,10 @@ celix_status_t shellTui_serviceChanged(service_listener_pt listener,
service_eve
         status = shellTui_initializeService(act);
     } else if ((event->type == OSGI_FRAMEWORK_SERVICE_EVENT_UNREGISTERING) &&
(equals)) {
         bundleContext_ungetService(act->context, act->reference, &result);
+        bundleContext_ungetServiceReference(act->context,act->reference);
         act->reference = NULL;
         act->shell = NULL;
 
-        status = shellTui_initializeService(act);
     }
 
     return status;


Mime
View raw message