celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abroekh...@apache.org
Subject svn commit: r1617702 - in /celix/trunk: framework/private/src/ remote_services/discovery_configured/private/include/ remote_services/discovery_configured/private/src/
Date Wed, 13 Aug 2014 11:03:57 GMT
Author: abroekhuis
Date: Wed Aug 13 11:03:57 2014
New Revision: 1617702

URL: http://svn.apache.org/r1617702
Log:
Fixed several bugs related to crashed.

Modified:
    celix/trunk/framework/private/src/service_registry.c
    celix/trunk/remote_services/discovery_configured/private/include/discovery.h
    celix/trunk/remote_services/discovery_configured/private/src/discovery.c
    celix/trunk/remote_services/discovery_configured/private/src/discovery_activator.c

Modified: celix/trunk/framework/private/src/service_registry.c
URL: http://svn.apache.org/viewvc/celix/trunk/framework/private/src/service_registry.c?rev=1617702&r1=1617701&r2=1617702&view=diff
==============================================================================
--- celix/trunk/framework/private/src/service_registry.c (original)
+++ celix/trunk/framework/private/src/service_registry.c Wed Aug 13 11:03:57 2014
@@ -254,7 +254,8 @@ celix_status_t serviceRegistry_unregiste
 		}
 		arrayList_destroy(clients);
 
-		serviceReference_invalidate(reference);
+		// Disabled for now, since a reference can already be destroyed here.
+//		serviceReference_invalidate(reference);
 	}
 	serviceRegistration_invalidate(registration);
 

Modified: celix/trunk/remote_services/discovery_configured/private/include/discovery.h
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/discovery_configured/private/include/discovery.h?rev=1617702&r1=1617701&r2=1617702&view=diff
==============================================================================
--- celix/trunk/remote_services/discovery_configured/private/include/discovery.h (original)
+++ celix/trunk/remote_services/discovery_configured/private/include/discovery.h Wed Aug 13
11:03:57 2014
@@ -36,7 +36,7 @@
 typedef struct discovery *discovery_pt;
 
 celix_status_t discovery_create(bundle_context_pt context, discovery_pt *discovery);
-celix_status_t discovery_destroy(discovery_pt *discovery);
+celix_status_t discovery_destroy(discovery_pt discovery);
 
 celix_status_t discovery_start(discovery_pt discovery);
 celix_status_t discovery_stop(discovery_pt discovery);

Modified: celix/trunk/remote_services/discovery_configured/private/src/discovery.c
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/discovery_configured/private/src/discovery.c?rev=1617702&r1=1617701&r2=1617702&view=diff
==============================================================================
--- celix/trunk/remote_services/discovery_configured/private/src/discovery.c (original)
+++ celix/trunk/remote_services/discovery_configured/private/src/discovery.c Wed Aug 13 11:03:57
2014
@@ -128,33 +128,33 @@ celix_status_t discovery_stop(discovery_
 	return status;
 }
 
-celix_status_t discovery_destroy(discovery_pt *discovery) {
+celix_status_t discovery_destroy(discovery_pt discovery) {
 	celix_status_t status = CELIX_SUCCESS;
 	hash_map_iterator_pt iter;
 
-	(*discovery)->context = NULL;
-	(*discovery)->poller = NULL;
-	(*discovery)->server = NULL;
+	discovery->context = NULL;
+	discovery->poller = NULL;
+	discovery->server = NULL;
 
-	celixThreadMutex_lock(&(*discovery)->discoveredServicesMutex);
+	celixThreadMutex_lock(&discovery->discoveredServicesMutex);
 
-	hashMap_destroy((*discovery)->discoveredServices, false, false);
-	(*discovery)->discoveredServices = NULL;
+	hashMap_destroy(discovery->discoveredServices, false, false);
+	discovery->discoveredServices = NULL;
 
-	celixThreadMutex_unlock(&(*discovery)->discoveredServicesMutex);
+	celixThreadMutex_unlock(&discovery->discoveredServicesMutex);
 
-	celixThreadMutex_destroy(&(*discovery)->discoveredServicesMutex);
+	celixThreadMutex_destroy(&discovery->discoveredServicesMutex);
 
-	celixThreadMutex_lock(&(*discovery)->listenerReferencesMutex);
+	celixThreadMutex_lock(&discovery->listenerReferencesMutex);
 
-	hashMap_destroy((*discovery)->listenerReferences, false, false);
-	(*discovery)->listenerReferences = NULL;
+	hashMap_destroy(discovery->listenerReferences, false, false);
+	discovery->listenerReferences = NULL;
 
-	celixThreadMutex_unlock(&(*discovery)->listenerReferencesMutex);
+	celixThreadMutex_unlock(&discovery->listenerReferencesMutex);
 
-	celixThreadMutex_destroy(&(*discovery)->listenerReferencesMutex);
+	celixThreadMutex_destroy(&discovery->listenerReferencesMutex);
 
-	free(*discovery);
+	free(discovery);
 
 	return status;
 }

Modified: celix/trunk/remote_services/discovery_configured/private/src/discovery_activator.c
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/discovery_configured/private/src/discovery_activator.c?rev=1617702&r1=1617701&r2=1617702&view=diff
==============================================================================
--- celix/trunk/remote_services/discovery_configured/private/src/discovery_activator.c (original)
+++ celix/trunk/remote_services/discovery_configured/private/src/discovery_activator.c Wed
Aug 13 11:03:57 2014
@@ -151,7 +151,7 @@ celix_status_t bundleActivator_destroy(v
 
 	status = serviceTracker_destroy(activator->endpointListenerTracker);
 
-	status = serviceRegistration_destroy(activator->endpointListenerService);
+//	status = serviceRegistration_destroy(activator->endpointListenerService);
 
 	status = discovery_destroy(activator->discovery);
 



Mime
View raw message