celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abroekh...@apache.org
Subject svn commit: r1650066 - in /celix/trunk/remote_services: ./ calculator_proxy2/ calculator_proxy2/private/ calculator_proxy2/private/include/ calculator_proxy2/private/src/ remote_service_admin/ remote_service_admin/private/src/ remote_service_admin_http...
Date Wed, 07 Jan 2015 14:27:33 GMT
Author: abroekhuis
Date: Wed Jan  7 14:27:33 2015
New Revision: 1650066

URL: http://svn.apache.org/r1650066
Log:
CELIX-200:
- Fixed issue where imported endpoints are not removed properly.
- Added additional proxy to the calculator for testing.
- Updated installation files to include the proper/new rsa headers and code.
- Updated proxy factory to copy the correct service properties to the proxy service.
- Exclude EXPORTED_INTERFACES for imported proxies to prevent a loop from export -> import
-> export -> ...

Added:
    celix/trunk/remote_services/calculator_proxy2/
    celix/trunk/remote_services/calculator_proxy2/CMakeLists.txt
    celix/trunk/remote_services/calculator_proxy2/private/
    celix/trunk/remote_services/calculator_proxy2/private/include/
    celix/trunk/remote_services/calculator_proxy2/private/include/calculator_proxy_impl.h
    celix/trunk/remote_services/calculator_proxy2/private/src/
    celix/trunk/remote_services/calculator_proxy2/private/src/calculator_proxy_activator.c
    celix/trunk/remote_services/calculator_proxy2/private/src/calculator_proxy_impl.c
Modified:
    celix/trunk/remote_services/CMakeLists.txt
    celix/trunk/remote_services/deploy.cmake
    celix/trunk/remote_services/remote_service_admin/CMakeLists.txt
    celix/trunk/remote_services/remote_service_admin/private/src/remote_proxy_factory_impl.c
    celix/trunk/remote_services/remote_service_admin_http/private/src/remote_service_admin_impl.c
    celix/trunk/remote_services/remote_service_admin_shm/CMakeLists.txt
    celix/trunk/remote_services/topology_manager/private/src/topology_manager.c

Modified: celix/trunk/remote_services/CMakeLists.txt
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/CMakeLists.txt?rev=1650066&r1=1650065&r2=1650066&view=diff
==============================================================================
--- celix/trunk/remote_services/CMakeLists.txt (original)
+++ celix/trunk/remote_services/CMakeLists.txt Wed Jan  7 14:27:33 2015
@@ -43,6 +43,7 @@ if (REMOTE_SERVICE_ADMIN)
     add_subdirectory(calculator_endpoint)
     add_subdirectory(calculator_endpoint2)
     add_subdirectory(calculator_proxy)
+    add_subdirectory(calculator_proxy2)
     add_subdirectory(calculator_shell)
 endif (REMOTE_SERVICE_ADMIN)
 

Added: celix/trunk/remote_services/calculator_proxy2/CMakeLists.txt
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/calculator_proxy2/CMakeLists.txt?rev=1650066&view=auto
==============================================================================
--- celix/trunk/remote_services/calculator_proxy2/CMakeLists.txt (added)
+++ celix/trunk/remote_services/calculator_proxy2/CMakeLists.txt Wed Jan  7 14:27:33 2015
@@ -0,0 +1,38 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+find_package(Jansson REQUIRED)
+
+include_directories("${JANSSON_INCLUDE_DIRS}")
+include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
+include_directories("${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin/public/include")
+include_directories("${PROJECT_SOURCE_DIR}/remote_services/calculator_proxy/private/include")
+include_directories("${PROJECT_SOURCE_DIR}/remote_services/calculator_service/public/include")
+include_directories("${PROJECT_SOURCE_DIR}/remote_services/endpoint_listener/public/include")
+
+SET(BUNDLE_SYMBOLICNAME "apache_celix_remoting_calculator2_proxy")
+SET(BUNDLE_VERSION "0.0.1")
+
+bundle(org.apache.celix.calc.api.Calculator2_proxy SOURCES 
+	private/src/calculator_proxy_activator
+	private/src/calculator_proxy_impl.c
+    ${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin/private/src/remote_proxy_factory_impl.c
+    
+    private/include/calculator_proxy_impl.h
+)
+
+target_link_libraries(org.apache.celix.calc.api.Calculator2_proxy celix_framework ${JANSSON_LIBRARIES})

Added: celix/trunk/remote_services/calculator_proxy2/private/include/calculator_proxy_impl.h
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/calculator_proxy2/private/include/calculator_proxy_impl.h?rev=1650066&view=auto
==============================================================================
--- celix/trunk/remote_services/calculator_proxy2/private/include/calculator_proxy_impl.h
(added)
+++ celix/trunk/remote_services/calculator_proxy2/private/include/calculator_proxy_impl.h
Wed Jan  7 14:27:33 2015
@@ -0,0 +1,59 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership.  The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+/*
+ * calculator_proxy_impl.h
+ *
+ *  \date       Oct 13, 2011
+ *  \author    	<a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
+ *  \copyright	Apache License, Version 2.0
+ */
+
+#ifndef CALCULATOR_PROXY_IMPL_H_
+#define CALCULATOR_PROXY_IMPL_H_
+
+#include "celix_errno.h"
+
+#include "calculator_service.h"
+#include "remote_proxy.h"
+#include "constants.h"
+#include "bundle_context.h"
+#include "hash_map.h"
+
+#include "endpoint_listener.h"
+
+
+struct calculator {
+	bundle_context_pt context;
+
+	endpoint_description_pt endpoint;
+	sendToHandle sendToCallback;
+	void * sendToHandler;
+};
+
+
+celix_status_t calculatorProxy_create(bundle_context_pt context, calculator_pt *endpoint);
+celix_status_t calculatorProxy_destroy(calculator_pt *endpoint);
+celix_status_t calculatorProxy_add(calculator_pt calculator, double a, double b, double *result);
+celix_status_t calculatorProxy_sub(calculator_pt calculator, double a, double b, double *result);
+celix_status_t calculatorProxy_sqrt(calculator_pt calculator, double a, double *result);
+
+celix_status_t calculatorProxy_registerProxyService(void* proxyFactoryService, endpoint_description_pt
endpoint, void* handler, sendToHandle callback);
+celix_status_t calculatorProxy_unregisterProxyService(void* proxyFactoryService, endpoint_description_pt
endpoint);
+
+#endif /* CALCULATOR_PROXY_IMPL_H_ */

Added: celix/trunk/remote_services/calculator_proxy2/private/src/calculator_proxy_activator.c
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/calculator_proxy2/private/src/calculator_proxy_activator.c?rev=1650066&view=auto
==============================================================================
--- celix/trunk/remote_services/calculator_proxy2/private/src/calculator_proxy_activator.c
(added)
+++ celix/trunk/remote_services/calculator_proxy2/private/src/calculator_proxy_activator.c
Wed Jan  7 14:27:33 2015
@@ -0,0 +1,125 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership.  The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+/*
+ * calculator_proxy_activator.c
+ *
+ *  \date       Oct 10, 2011
+ *  \author    	<a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
+ *  \copyright	Apache License, Version 2.0
+ */
+#include <stdlib.h>
+
+#include "bundle_activator.h"
+#include "service_registration.h"
+#include "remote_proxy.h"
+
+#include "calculator_proxy_impl.h"
+
+struct activator {
+	bundle_context_pt context;
+	remote_proxy_factory_pt factory_ptr;
+};
+
+static celix_status_t calculatorProxyFactory_create(void *handle, endpoint_description_pt
endpointDescription, remote_service_admin_pt rsa, sendToHandle sendToCallback, properties_pt
properties, void **service);
+static celix_status_t calculatorProxyFactory_destroy(void *handle, void *service);
+
+celix_status_t bundleActivator_create(bundle_context_pt context, void **userData) {
+	celix_status_t status = CELIX_SUCCESS;
+
+	struct activator *activator;
+
+	activator = calloc(1, sizeof(*activator));
+	if (!activator) {
+		status = CELIX_ENOMEM;
+	} else {
+		activator->factory_ptr = NULL;
+		activator->context = context;
+
+		*userData = activator;
+	}
+
+	return status;
+}
+
+celix_status_t bundleActivator_start(void * userData, bundle_context_pt context) {
+	celix_status_t status = CELIX_SUCCESS;
+	struct activator *activator = userData;
+
+	remoteProxyFactory_create(context, "org.apache.celix.calc.api.Calculator2", activator,
+			calculatorProxyFactory_create, calculatorProxyFactory_destroy,
+			&activator->factory_ptr);
+	remoteProxyFactory_register(activator->factory_ptr);
+
+	return status;
+}
+
+celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) {
+	celix_status_t status = CELIX_SUCCESS;
+	struct activator *activator = userData;
+
+	remoteProxyFactory_unregister(activator->factory_ptr);
+	remoteProxyFactory_destroy(&activator->factory_ptr);
+
+	return status;
+}
+
+celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt context) {
+	celix_status_t status = CELIX_SUCCESS;
+	struct activator *activator = userData;
+
+	free(activator);
+
+	return status;
+}
+
+static celix_status_t calculatorProxyFactory_create(void *handle, endpoint_description_pt
endpointDescription, remote_service_admin_pt rsa, sendToHandle sendToCallback, properties_pt
properties, void **service) {
+	celix_status_t status = CELIX_SUCCESS;
+	struct activator *activator = handle;
+
+	calculator_service_pt calculatorService = calloc(1, sizeof(*calculatorService));
+	calculatorProxy_create(activator->context, &calculatorService->calculator);
+	calculatorService->add = calculatorProxy_add;
+	calculatorService->sub = calculatorProxy_sub;
+	calculatorService->sqrt = calculatorProxy_sqrt;
+
+	calculatorService->calculator->endpoint = endpointDescription;
+	calculatorService->calculator->sendToHandler = rsa;
+	calculatorService->calculator->sendToCallback = sendToCallback;
+
+	*service = calculatorService;
+
+	return status;
+}
+
+static celix_status_t calculatorProxyFactory_destroy(void *handle, void *service) {
+	celix_status_t status = CELIX_SUCCESS;
+	struct activator *activator = handle;
+	calculator_service_pt calculatorService = service;
+
+	if (!calculatorService) {
+		status = CELIX_ILLEGAL_ARGUMENT;
+	}
+
+	if (status == CELIX_SUCCESS) {
+		calculatorProxy_destroy(&calculatorService->calculator);
+		free(calculatorService);
+	}
+
+	return status;
+}

Added: celix/trunk/remote_services/calculator_proxy2/private/src/calculator_proxy_impl.c
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/calculator_proxy2/private/src/calculator_proxy_impl.c?rev=1650066&view=auto
==============================================================================
--- celix/trunk/remote_services/calculator_proxy2/private/src/calculator_proxy_impl.c (added)
+++ celix/trunk/remote_services/calculator_proxy2/private/src/calculator_proxy_impl.c Wed
Jan  7 14:27:33 2015
@@ -0,0 +1,173 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership.  The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+/*
+ * calculator_proxy_impl.c
+ *
+ *  \date       Oct 7, 2011
+ *  \author    	<a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
+ *  \copyright	Apache License, Version 2.0
+ */
+#include <jansson.h>
+
+#include <string.h>
+#include <stddef.h>
+
+#include "celix_errno.h"
+#include "array_list.h"
+#include "calculator_proxy_impl.h"
+
+/* Allows the use of Jansson < 2.3 */
+#ifndef JSON_DECODE_ANY
+#define JSON_DECODE_ANY 0
+#endif
+
+celix_status_t calculatorProxy_create(bundle_context_pt context, calculator_pt *calculator)
 {
+	celix_status_t status = CELIX_SUCCESS;
+	*calculator = calloc(1, sizeof(**calculator));
+	if (!*calculator) {
+		status = CELIX_ENOMEM;
+	} else {
+		(*calculator)->context = context;
+		(*calculator)->endpoint = NULL;
+		(*calculator)->sendToCallback=NULL;
+		(*calculator)->sendToHandler=NULL;
+	}
+
+	return status;
+}
+
+
+celix_status_t calculatorProxy_destroy(calculator_pt *calculator)  {
+	celix_status_t status = CELIX_SUCCESS;
+
+	free(*calculator);
+	*calculator = NULL;
+
+	return status;
+}
+
+// { "m": "" "a":["arg1", "arg2"] }
+celix_status_t calculatorProxy_add(calculator_pt calculator, double a, double b, double *result)
{
+	celix_status_t status = CELIX_SUCCESS;
+
+	if (calculator->endpoint != NULL) {
+		json_t *root;
+		root = json_pack("{s:s, s:[ff]}", "m", "add(DD)D", "a", a, b);
+
+		char *data = json_dumps(root, 0);
+		char *reply = NULL;
+		int replyStatus = 0;
+
+		calculator->sendToCallback(calculator->sendToHandler, calculator->endpoint, data,
&reply, &replyStatus);
+
+		if (status == CELIX_SUCCESS) {
+		    printf("Handle reply: %s\n", reply);
+			json_error_t error;
+			json_t *js_reply = json_loads(reply, 0, &error);
+			if (js_reply) {
+				json_unpack(js_reply, "{s:f}", "r", result);
+				json_decref(js_reply);
+			} else {
+				printf("PROXY: got error '%s' for '%s'\n", error.text, reply);
+				status = CELIX_BUNDLE_EXCEPTION;
+			}
+		}
+		json_decref(root);
+
+		free(data);
+		free(reply);
+	} else {
+		printf("CALCULATOR_PROXY: No endpoint information available\n");
+		status = CELIX_BUNDLE_EXCEPTION;
+	}
+
+	return status;
+}
+
+celix_status_t calculatorProxy_sub(calculator_pt calculator, double a, double b, double *result)
{
+	celix_status_t status = CELIX_SUCCESS;
+	if (calculator->endpoint != NULL) {
+		json_t *root;
+		root = json_pack("{s:s, s:[ff]}", "m", "sub(DD)D", "a", a, b);
+
+		char *data = json_dumps(root, 0);
+		char *reply = NULL;
+		int replyStatus = 0;
+
+		calculator->sendToCallback(calculator->sendToHandler, calculator->endpoint, data,
&reply, &replyStatus);
+
+		if (status == CELIX_SUCCESS) {
+			json_error_t error;
+			json_t *js_reply = json_loads(reply, 0, &error);
+			if (js_reply) {
+			    json_unpack(js_reply, "{s:f}", "r", result);
+			    json_decref(js_reply);
+			} else {
+				printf("PROXY: got error '%s' for '%s'\n", error.text, reply);
+				status = CELIX_BUNDLE_EXCEPTION;
+			}
+		}
+
+		json_decref(root);
+
+		free(data);
+		free(reply);
+	} else {
+		printf("CALCULATOR_PROXY: No endpoint information available\n");
+		status = CELIX_BUNDLE_EXCEPTION;
+	}
+
+	return status;
+}
+
+celix_status_t calculatorProxy_sqrt(calculator_pt calculator, double a, double *result) {
+	celix_status_t status = CELIX_SUCCESS;
+	if (calculator->endpoint != NULL) {
+		json_t *root;
+		root = json_pack("{s:s, s:[f]}", "m", "sqrt(D)D", "a", a);
+
+		char *data = json_dumps(root, 0);
+		char *reply = NULL;
+		int replyStatus;
+
+		calculator->sendToCallback(calculator->sendToHandler, calculator->endpoint, data,
&reply, &replyStatus);
+
+		if (status == CELIX_SUCCESS) {
+			json_error_t error;
+			json_t *js_reply = json_loads(reply, JSON_DECODE_ANY, &error);
+			if (js_reply) {
+			    json_unpack(js_reply, "{s:f}", "r", result);
+			    json_decref(js_reply);
+			} else {
+				printf("PROXY: got error '%s' for '%s'\n", error.text, reply);
+				status = CELIX_BUNDLE_EXCEPTION;
+			}
+		}
+
+		json_decref(root);
+
+		free(data);
+		free(reply);
+	} else {
+		printf("CALCULATOR_PROXY: No endpoint information available\n");
+		status = CELIX_BUNDLE_EXCEPTION;
+	}
+
+	return status;
+}

Modified: celix/trunk/remote_services/deploy.cmake
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/deploy.cmake?rev=1650066&r1=1650065&r2=1650066&view=diff
==============================================================================
--- celix/trunk/remote_services/deploy.cmake (original)
+++ celix/trunk/remote_services/deploy.cmake Wed Jan  7 14:27:33 2015
@@ -21,7 +21,7 @@ if (REMOTE_SERVICE_ADMIN)
                                     org.apache.celix.calc.api.Calculator_endpoint
                                     org.apache.celix.calc.api.Calculator2_endpoint)
     deploy("remote-services-cfg-client" BUNDLES topology_manager remote_service_admin_http
shell shell_tui log_service log_writer calculator_shell discovery_configured
-                                        ENDPOINTS org.apache.celix.calc.api.Calculator_proxy)
+                                        ENDPOINTS org.apache.celix.calc.api.Calculator_proxy
org.apache.celix.calc.api.Calculator2_proxy)
 
 	#TODO for remote-service-client the discovery should be added as last. If this is not done,

 	#discovery will discover services before the topology manager is registered as 

Modified: celix/trunk/remote_services/remote_service_admin/CMakeLists.txt
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/remote_service_admin/CMakeLists.txt?rev=1650066&r1=1650065&r2=1650066&view=diff
==============================================================================
--- celix/trunk/remote_services/remote_service_admin/CMakeLists.txt (original)
+++ celix/trunk/remote_services/remote_service_admin/CMakeLists.txt Wed Jan  7 14:27:33 2015
@@ -33,6 +33,13 @@ install (FILES
     COMPONENT 
         remote_service_admin
 )
+install (FILES
+        private/src/remote_proxy_factory_impl.c
+    DESTINATION
+        share/celix/remote_service_admin
+    COMPONENT
+        remote_service_admin
+)
 install (FILES 
         ${PROJECT_SOURCE_DIR}/remote_services/endpoint_listener/public/include/endpoint_listener.h
     DESTINATION 

Modified: celix/trunk/remote_services/remote_service_admin/private/src/remote_proxy_factory_impl.c
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/remote_service_admin/private/src/remote_proxy_factory_impl.c?rev=1650066&r1=1650065&r2=1650066&view=diff
==============================================================================
--- celix/trunk/remote_services/remote_service_admin/private/src/remote_proxy_factory_impl.c
(original)
+++ celix/trunk/remote_services/remote_service_admin/private/src/remote_proxy_factory_impl.c
Wed Jan  7 14:27:33 2015
@@ -151,9 +151,14 @@ static celix_status_t remoteProxyFactory
 
 	if (status == CELIX_SUCCESS) {
 		properties_set(proxy_instance_ptr->properties, "proxy.interface", remote_proxy_factory_ptr->service);
-		properties_set(proxy_instance_ptr->properties, "endpoint.framework.uuid", (char *) endpointDescription->frameworkUUID);
 
-		// #TODO Copy properties from the endpoint
+		hash_map_iterator_pt iter = hashMapIterator_create(endpointDescription->properties);
+		while (hashMapIterator_hasNext(iter)) {
+			hash_map_entry_pt entry = hashMapIterator_nextEntry(iter);
+			char *key = hashMapEntry_getKey(entry);
+			char *value = hashMapEntry_getValue(entry);
+			properties_set(proxy_instance_ptr->properties, key, value);
+		}
 	}
 
 	if (status == CELIX_SUCCESS) {

Modified: celix/trunk/remote_services/remote_service_admin_http/private/src/remote_service_admin_impl.c
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/remote_service_admin_http/private/src/remote_service_admin_impl.c?rev=1650066&r1=1650065&r2=1650066&view=diff
==============================================================================
--- celix/trunk/remote_services/remote_service_admin_http/private/src/remote_service_admin_impl.c
(original)
+++ celix/trunk/remote_services/remote_service_admin_http/private/src/remote_service_admin_impl.c
Wed Jan  7 14:27:33 2015
@@ -455,7 +455,9 @@ celix_status_t remoteServiceAdmin_instal
         char *key = keys[i];
         char *value = NULL;
 
-        if (serviceReference_getProperty(reference, key, &value) == CELIX_SUCCESS &&
strcmp(key, (char*) OSGI_FRAMEWORK_OBJECTCLASS) != 0) {
+        if (serviceReference_getProperty(reference, key, &value) == CELIX_SUCCESS
+        		&& strcmp(key, (char*) OSGI_RSA_SERVICE_EXPORTED_INTERFACES) != 0
+        		&& strcmp(key, (char*) OSGI_FRAMEWORK_OBJECTCLASS) != 0) {
         	properties_set(endpointProperties, key, value);
         }
 	}
@@ -595,6 +597,9 @@ celix_status_t remoteServiceAdmin_import
 	if (status != CELIX_SUCCESS || (registration_factory->trackedFactory == NULL))
 	{
 		logHelper_log(admin->loghelper, OSGI_LOGSERVICE_WARNING, "RSA: no proxyFactory available.");
+		if (status == CELIX_SUCCESS) {
+			status = CELIX_SERVICE_EXCEPTION;
+		}
 	}
 	else
 	{

Modified: celix/trunk/remote_services/remote_service_admin_shm/CMakeLists.txt
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/remote_service_admin_shm/CMakeLists.txt?rev=1650066&r1=1650065&r2=1650066&view=diff
==============================================================================
--- celix/trunk/remote_services/remote_service_admin_shm/CMakeLists.txt (original)
+++ celix/trunk/remote_services/remote_service_admin_shm/CMakeLists.txt Wed Jan  7 14:27:33
2015
@@ -43,11 +43,9 @@ if (RSA_BUNDLES_REMOTE_SERVICE_ADMIN_SHM
 
 	install_bundle(remote_service_admin_shm
 		HEADERS
-			${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin/public/include/remote_endpoint_impl.h
-			${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin/public/include/remote_endpoint.h
-			${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin/public/include/remote_proxy.h
-			${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin/public/include/remote_service_admin.h
+			${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin_shm/public/include/remote_service_admin_shm.h
 	)
 
 	target_link_libraries(remote_service_admin_shm celix_framework ${APRUTIL_LIBRARY})
 endif (RSA_BUNDLES_REMOTE_SERVICE_ADMIN_SHM)
+

Modified: celix/trunk/remote_services/topology_manager/private/src/topology_manager.c
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/topology_manager/private/src/topology_manager.c?rev=1650066&r1=1650065&r2=1650066&view=diff
==============================================================================
--- celix/trunk/remote_services/topology_manager/private/src/topology_manager.c (original)
+++ celix/trunk/remote_services/topology_manager/private/src/topology_manager.c Wed Jan  7
14:27:33 2015
@@ -388,12 +388,12 @@ celix_status_t topologyManager_removeImp
 
                 status = rsa->importRegistration_close(rsa->admin, import);
                 if (status == CELIX_SUCCESS) {
-                    hashMap_remove(imports, rsa);
+                    hashMapIterator_remove(importsIter);
                 }
             }
             hashMapIterator_destroy(importsIter);
 
-        	imports = hashMap_remove(manager->importedServices, ep);
+        	hashMapIterator_remove(iter);
 
         	if (imports != NULL) {
         		hashMap_destroy(imports, false, false);



Mime
View raw message