celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abroekh...@apache.org
Subject svn commit: r1654986 - in /celix/trunk/remote_services: discovery/private/src/discovery_activator.c discovery_configured/private/src/discovery_impl.c
Date Tue, 27 Jan 2015 08:04:03 GMT
Author: abroekhuis
Date: Tue Jan 27 08:04:02 2015
New Revision: 1654986

URL: http://svn.apache.org/r1654986
Log:
CELIX-204: Fixed issue with discovery update not removing/detecting endpoints.

Modified:
    celix/trunk/remote_services/discovery/private/src/discovery_activator.c
    celix/trunk/remote_services/discovery_configured/private/src/discovery_impl.c

Modified: celix/trunk/remote_services/discovery/private/src/discovery_activator.c
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/discovery/private/src/discovery_activator.c?rev=1654986&r1=1654985&r2=1654986&view=diff
==============================================================================
--- celix/trunk/remote_services/discovery/private/src/discovery_activator.c (original)
+++ celix/trunk/remote_services/discovery/private/src/discovery_activator.c Tue Jan 27 08:04:02
2015
@@ -150,13 +150,14 @@ celix_status_t bundleActivator_start(voi
 celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) {
 	celix_status_t status = CELIX_SUCCESS;
 	struct activator *activator = userData;
+
+	status = discovery_stop(activator->discovery);
+
 	status = serviceTracker_close(activator->endpointListenerTracker);
 
 	status = serviceRegistration_unregister(activator->endpointListenerService);
 	free(activator->endpointListener);
 
-	status = discovery_stop(activator->discovery);
-
 	logHelper_stop(activator->loghelper);
 
 	return status;

Modified: celix/trunk/remote_services/discovery_configured/private/src/discovery_impl.c
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/discovery_configured/private/src/discovery_impl.c?rev=1654986&r1=1654985&r2=1654986&view=diff
==============================================================================
--- celix/trunk/remote_services/discovery_configured/private/src/discovery_impl.c (original)
+++ celix/trunk/remote_services/discovery_configured/private/src/discovery_impl.c Tue Jan
27 08:04:02 2015
@@ -95,29 +95,7 @@ celix_status_t discovery_stop(discovery_
 	celix_status_t status;
 
 	status = endpointDiscoveryServer_destroy(discovery->server);
-	if (status != CELIX_SUCCESS) {
-		return CELIX_BUNDLE_EXCEPTION;
-	}
-
 	status = endpointDiscoveryPoller_destroy(discovery->poller);
-	if (status != CELIX_SUCCESS) {
-		return CELIX_BUNDLE_EXCEPTION;
-	}
-
-	hash_map_iterator_pt iter;
-
-	celixThreadMutex_lock(&discovery->discoveredServicesMutex);
-
-	iter = hashMapIterator_create(discovery->discoveredServices);
-	while (hashMapIterator_hasNext(iter)) {
-		hash_map_entry_pt entry = hashMapIterator_nextEntry(iter);
-		endpoint_description_pt endpoint = hashMapEntry_getValue(entry);
-
-		discovery_informEndpointListeners(discovery, endpoint, false);
-	}
-	hashMapIterator_destroy(iter);
-
-	celixThreadMutex_unlock(&discovery->discoveredServicesMutex);
 
 	logHelper_stop(discovery->loghelper);
 



Mime
View raw message