celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abroekh...@apache.org
Subject svn commit: r1620371 - in /celix/trunk/remote_services: calculator_endpoint/private/include/ calculator_endpoint/private/src/ remote_service_admin_http/private/src/
Date Mon, 25 Aug 2014 16:47:13 GMT
Author: abroekhuis
Date: Mon Aug 25 16:47:12 2014
New Revision: 1620371

URL: http://svn.apache.org/r1620371
Log:
CELIX-140: Applied patch

Modified:
    celix/trunk/remote_services/calculator_endpoint/private/include/calculator_endpoint_impl.h
    celix/trunk/remote_services/calculator_endpoint/private/src/calculator_endpoint_activator.c
    celix/trunk/remote_services/calculator_endpoint/private/src/calculator_endpoint_impl.c
    celix/trunk/remote_services/remote_service_admin_http/private/src/export_registration_impl.c

Modified: celix/trunk/remote_services/calculator_endpoint/private/include/calculator_endpoint_impl.h
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/calculator_endpoint/private/include/calculator_endpoint_impl.h?rev=1620371&r1=1620370&r2=1620371&view=diff
==============================================================================
--- celix/trunk/remote_services/calculator_endpoint/private/include/calculator_endpoint_impl.h
(original)
+++ celix/trunk/remote_services/calculator_endpoint/private/include/calculator_endpoint_impl.h
Mon Aug 25 16:47:12 2014
@@ -32,6 +32,8 @@
 #include "celix_errno.h"
 #include "remote_endpoint_impl.h"
 
+#include "calculator_service.h"
+
 celix_status_t calculatorEndpoint_create(apr_pool_t *pool, remote_endpoint_pt *endpoint);
 
 celix_status_t calculatorEndpoint_setService(remote_endpoint_pt endpoint, void *service);

Modified: celix/trunk/remote_services/calculator_endpoint/private/src/calculator_endpoint_activator.c
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/calculator_endpoint/private/src/calculator_endpoint_activator.c?rev=1620371&r1=1620370&r2=1620371&view=diff
==============================================================================
--- celix/trunk/remote_services/calculator_endpoint/private/src/calculator_endpoint_activator.c
(original)
+++ celix/trunk/remote_services/calculator_endpoint/private/src/calculator_endpoint_activator.c
Mon Aug 25 16:47:12 2014
@@ -75,7 +75,10 @@ celix_status_t bundleActivator_start(voi
 	endpointService->handleRequest = calculatorEndpoint_handleRequest;
 	endpointService->setService = calculatorEndpoint_setService;
 
-	bundleContext_registerService(context, OSGI_RSA_REMOTE_ENDPOINT, endpointService, NULL,
&activator->endpoint);
+	properties_pt props = properties_create();
+	properties_set(props, (char *) "remote.interface", (char *) CALCULATOR_SERVICE);
+
+	bundleContext_registerService(context, OSGI_RSA_REMOTE_ENDPOINT, endpointService, props,
&activator->endpoint);
 
 
 	return status;

Modified: celix/trunk/remote_services/calculator_endpoint/private/src/calculator_endpoint_impl.c
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/calculator_endpoint/private/src/calculator_endpoint_impl.c?rev=1620371&r1=1620370&r2=1620371&view=diff
==============================================================================
--- celix/trunk/remote_services/calculator_endpoint/private/src/calculator_endpoint_impl.c
(original)
+++ celix/trunk/remote_services/calculator_endpoint/private/src/calculator_endpoint_impl.c
Mon Aug 25 16:47:12 2014
@@ -29,8 +29,6 @@
 
 #include "calculator_endpoint_impl.h"
 
-#include "calculator_service.h"
-
 celix_status_t calculatorEndpoint_create(apr_pool_t *pool, remote_endpoint_pt *endpoint)
{
 	celix_status_t status = CELIX_SUCCESS;
 	*endpoint = apr_palloc(pool, sizeof(**endpoint));
@@ -40,7 +38,6 @@ celix_status_t calculatorEndpoint_create
 		(*endpoint)->service = NULL;
 	}
 
-
 	return status;
 }
 

Modified: celix/trunk/remote_services/remote_service_admin_http/private/src/export_registration_impl.c
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/remote_service_admin_http/private/src/export_registration_impl.c?rev=1620371&r1=1620370&r2=1620371&view=diff
==============================================================================
--- celix/trunk/remote_services/remote_service_admin_http/private/src/export_registration_impl.c
(original)
+++ celix/trunk/remote_services/remote_service_admin_http/private/src/export_registration_impl.c
Mon Aug 25 16:47:12 2014
@@ -27,6 +27,8 @@
 
 #include <apr_strings.h>
 
+#include "constants.h"
+
 #include "celix_errno.h"
 
 #include "export_registration_impl.h"
@@ -109,7 +111,8 @@ celix_status_t exportRegistration_create
 			exportRegistration_endpointAdded, exportRegistration_endpointModified, exportRegistration_endpointRemoved,
&customizer);
 
 	if (status == CELIX_SUCCESS) {
-		status = serviceTracker_create(registration->context, OSGI_RSA_REMOTE_ENDPOINT, customizer,
tracker);
+		char *filter = apr_pstrcat(registration->pool, "(&(", OSGI_FRAMEWORK_OBJECTCLASS,
"=", OSGI_RSA_REMOTE_ENDPOINT, ")(remote.interface=", registration->endpointDescription->service,
"))", NULL);
+		status = serviceTracker_createWithFilter(registration->context, filter, customizer,
tracker);
 	}
 
 	return status;



Mime
View raw message