incubator-celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject svn commit: r1333342 - in /incubator/celix/trunk/remote_services/remote_service_admin/private: include/remote_service_admin_impl.h src/export_registration_impl.c src/import_registration_impl.c src/remote_service_admin_impl.c
Date Thu, 03 May 2012 07:55:53 GMT
Author: pnoltes
Date: Thu May  3 07:55:52 2012
New Revision: 1333342

URL: http://svn.apache.org/viewvc?rev=1333342&view=rev
Log:
CELIX-34: Added config.properties support for RSA_PORT and RS_BUNDLES

Modified:
    incubator/celix/trunk/remote_services/remote_service_admin/private/include/remote_service_admin_impl.h
    incubator/celix/trunk/remote_services/remote_service_admin/private/src/export_registration_impl.c
    incubator/celix/trunk/remote_services/remote_service_admin/private/src/import_registration_impl.c
    incubator/celix/trunk/remote_services/remote_service_admin/private/src/remote_service_admin_impl.c

Modified: incubator/celix/trunk/remote_services/remote_service_admin/private/include/remote_service_admin_impl.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/remote_services/remote_service_admin/private/include/remote_service_admin_impl.h?rev=1333342&r1=1333341&r2=1333342&view=diff
==============================================================================
--- incubator/celix/trunk/remote_services/remote_service_admin/private/include/remote_service_admin_impl.h
(original)
+++ incubator/celix/trunk/remote_services/remote_service_admin/private/include/remote_service_admin_impl.h
Thu May  3 07:55:52 2012
@@ -11,7 +11,8 @@
 #include "remote_service_admin.h"
 #include "mongoose.h"
 
-#define BUNDLE_STORE "rs_bundles"
+#define BUNDLE_STORE_PROPERTY_NAME "RS_BUNDLE"
+#define DEFAULT_BUNDLE_STORE "rs_bundles"
 
 struct export_reference {
 	endpoint_description_t endpoint;

Modified: incubator/celix/trunk/remote_services/remote_service_admin/private/src/export_registration_impl.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/remote_services/remote_service_admin/private/src/export_registration_impl.c?rev=1333342&r1=1333341&r2=1333342&view=diff
==============================================================================
--- incubator/celix/trunk/remote_services/remote_service_admin/private/src/export_registration_impl.c
(original)
+++ incubator/celix/trunk/remote_services/remote_service_admin/private/src/export_registration_impl.c
Thu May  3 07:55:52 2012
@@ -150,7 +150,12 @@ celix_status_t exportRegistration_endpoi
 celix_status_t exportRegistration_open(export_registration_t registration) {
 	celix_status_t status = CELIX_SUCCESS;
 
-	char *name = apr_pstrcat(registration->pool, BUNDLE_STORE, "/", registration->endpointDescription->service,
"_endpoint.zip", NULL);
+	char *bundleStore = NULL;
+	bundleContext_getProperty(registration->context, BUNDLE_STORE_PROPERTY_NAME, &bundleStore);
+	if (bundleStore == NULL) {
+		bundleStore = DEFAULT_BUNDLE_STORE;
+	}
+	char *name = apr_pstrcat(registration->pool, bundleStore, "/", registration->endpointDescription->service,
"_endpoint.zip", NULL);
 	status = bundleContext_installBundle(registration->context, name, &registration->bundle);
 	if (status == CELIX_SUCCESS) {
 		status = bundle_start(registration->bundle, 0);

Modified: incubator/celix/trunk/remote_services/remote_service_admin/private/src/import_registration_impl.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/remote_services/remote_service_admin/private/src/import_registration_impl.c?rev=1333342&r1=1333341&r2=1333342&view=diff
==============================================================================
--- incubator/celix/trunk/remote_services/remote_service_admin/private/src/import_registration_impl.c
(original)
+++ incubator/celix/trunk/remote_services/remote_service_admin/private/src/import_registration_impl.c
Thu May  3 07:55:52 2012
@@ -144,7 +144,12 @@ celix_status_t importRegistration_proxyR
 celix_status_t importRegistration_open(import_registration_t registration) {
 	celix_status_t status = CELIX_SUCCESS;
 
-	char *name = apr_pstrcat(registration->pool, BUNDLE_STORE, "/", registration->endpointDescription->service,
"_proxy.zip", NULL);
+	char *bundleStore = NULL;
+	bundleContext_getProperty(registration->context, BUNDLE_STORE_PROPERTY_NAME, &bundleStore);
+	if (bundleStore == NULL) {
+		bundleStore = DEFAULT_BUNDLE_STORE;
+	}
+	char *name = apr_pstrcat(registration->pool, bundleStore, "/", registration->endpointDescription->service,
"_proxy.zip", NULL);
 	status = bundleContext_installBundle(registration->context, name, &registration->bundle);
 	if (status == CELIX_SUCCESS) {
 		status = bundle_start(registration->bundle, 0);

Modified: incubator/celix/trunk/remote_services/remote_service_admin/private/src/remote_service_admin_impl.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/remote_services/remote_service_admin/private/src/remote_service_admin_impl.c?rev=1333342&r1=1333341&r2=1333342&view=diff
==============================================================================
--- incubator/celix/trunk/remote_services/remote_service_admin/private/src/remote_service_admin_impl.c
(original)
+++ incubator/celix/trunk/remote_services/remote_service_admin/private/src/remote_service_admin_impl.c
Thu May  3 07:55:52 2012
@@ -45,7 +45,8 @@ celix_status_t remoteServiceAdmin_create
 		(*admin)->importedServices = hashMap_create(NULL, NULL, NULL, NULL);
 
 		// Start webserver
-		const char *port = getenv("RSA_PORT");
+		char *port = NULL;
+		bundleContext_getProperty(context, "RSA_PORT", &port);
 		if (port == NULL) {
 			printf("No RemoteServiceAdmin port set, set it using RSA_PORT!\n");
 		}



Mime
View raw message