incubator-celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abroekh...@apache.org
Subject svn commit: r1485122 - in /incubator/celix/trunk: framework/private/src/framework.c remote_services/deploy.cmake remote_services/discovery/private/src/discovery_activator.c
Date Wed, 22 May 2013 08:54:45 GMT
Author: abroekhuis
Date: Wed May 22 08:54:45 2013
New Revision: 1485122

URL: http://svn.apache.org/r1485122
Log:
CELIX-59: Applied patch partially.

Left out the change to the topology manager's activator. Supplying a NULL properties should
work.

Modified:
    incubator/celix/trunk/framework/private/src/framework.c
    incubator/celix/trunk/remote_services/deploy.cmake
    incubator/celix/trunk/remote_services/discovery/private/src/discovery_activator.c

Modified: incubator/celix/trunk/framework/private/src/framework.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/framework.c?rev=1485122&r1=1485121&r2=1485122&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/framework.c (original)
+++ incubator/celix/trunk/framework/private/src/framework.c Wed May 22 08:54:45 2013
@@ -1201,8 +1201,9 @@ celix_status_t fw_registerService(framew
 		bundle_getMemoryPool(bundle, &pool);
 
 		arrayList_create(pool, &infos);
-		for (i = 0; i > arrayList_size(framework->serviceListeners); i++) {
-			fw_service_listener_t listener = (fw_service_listener_t) (framework->serviceListeners,
i);
+		for (i = 0; i < arrayList_size(framework->serviceListeners); i++) {
+			fw_service_listener_t listener =(fw_service_listener_t) arrayList_get(framework->serviceListeners,
i);
+
 			apr_pool_t *pool;
 			bundle_context_t context;
 			listener_hook_info_t info;
@@ -1210,7 +1211,7 @@ celix_status_t fw_registerService(framew
 
 			bundle_getContext(bundle, &context);
 			bundleContext_getMemoryPool(context, &pool);
-			info = (listener_hook_info_t) (pool, sizeof(*info));
+			info = (listener_hook_info_t) apr_palloc(pool, sizeof(*info));
 
 			bundle_getContext(listener->bundle, &lContext);
 			info->context = lContext;
@@ -1223,7 +1224,7 @@ celix_status_t fw_registerService(framew
 		apr_pool_create(&subpool, pool);
 
 		serviceRegistry_createServiceReference(framework->registry, subpool, *registration,
&ref);
-		hook = (listener_hook_service_t) (framework, framework->bundle, ref);
+		hook = (listener_hook_service_t) fw_getService(framework,framework->bundle, ref);
 		hook->added(hook->handle, infos);
 		serviceRegistry_ungetService(framework->registry, framework->bundle, ref);
 
@@ -2001,7 +2002,7 @@ static void *APR_THREAD_FUNC fw_eventDis
 			int size = arrayList_size(request->listeners);
 			for (i = 0; i < size; i++) {
 				if (request->type == BUNDLE_EVENT_TYPE) {
-					fw_bundle_listener_t listener = (fw_bundle_listener_t) (request->listeners, i);
+					fw_bundle_listener_t listener = (fw_bundle_listener_t) arrayList_get(request->listeners,
i);
 					bundle_event_t event = (bundle_event_t) apr_palloc(listener->listener->pool, sizeof(*event));
 					event->bundle = request->bundle;
 					event->type = request->type;

Modified: incubator/celix/trunk/remote_services/deploy.cmake
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/remote_services/deploy.cmake?rev=1485122&r1=1485121&r2=1485122&view=diff
==============================================================================
--- incubator/celix/trunk/remote_services/deploy.cmake (original)
+++ incubator/celix/trunk/remote_services/deploy.cmake Wed May 22 08:54:45 2013
@@ -16,6 +16,6 @@
 # under the License.
 is_enabled(REMOTE_SERVICE_ADMIN)
 if (REMOTE_SERVICE_ADMIN)
-	deploy("remote-services" BUNDLES discovery topology_manager remote_service_admin example
shell shell_tui log_service log_writer)
-	deploy("remote-services-client" BUNDLES discovery topology_manager remote_service_admin
shell shell_tui log_service log_writer calc_shell)
-endif (REMOTE_SERVICE_ADMIN)
\ No newline at end of file
+	 deploy("remote-services" BUNDLES discovery topology_manager remote_service_admin example
example_endpoint shell shell_tui log_service log_writer)
+	deploy("remote-services-client" BUNDLES discovery topology_manager remote_service_admin
example_proxy shell shell_tui log_service log_writer calc_shell)
+endif (REMOTE_SERVICE_ADMIN)

Modified: incubator/celix/trunk/remote_services/discovery/private/src/discovery_activator.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/remote_services/discovery/private/src/discovery_activator.c?rev=1485122&r1=1485121&r2=1485122&view=diff
==============================================================================
--- incubator/celix/trunk/remote_services/discovery/private/src/discovery_activator.c (original)
+++ incubator/celix/trunk/remote_services/discovery/private/src/discovery_activator.c Wed
May 22 08:54:45 2013
@@ -67,6 +67,7 @@ celix_status_t bundleActivator_create(bu
 		activator->pool = pool;
 		activator->context = context;
 		activator->endpointListenerTracker = NULL;
+		activator->endpointListenerService = NULL;
 
 		discovery_create(pool, context, &activator->discovery);
 
@@ -112,7 +113,7 @@ celix_status_t bundleActivator_start(voi
 	discoveryActivator_getUUID(activator, &uuid);
 	char *scope = apr_pstrcat(activator->pool, "(&(", OBJECTCLASS, "=*)(", ENDPOINT_FRAMEWORK_UUID,
"=", uuid, "))", NULL);
 	properties_set(props, (char *) ENDPOINT_LISTENER_SCOPE, scope);
-	bundleContext_registerService(context, (char *) endpoint_listener_service, endpointListener,
props, &activator->endpointListenerService);
+	status = bundleContext_registerService(context, (char *) endpoint_listener_service, endpointListener,
props, &activator->endpointListenerService);
 
 	return status;
 }



Mime
View raw message