celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpe...@apache.org
Subject svn commit: r1641254 - in /celix/trunk/remote_services/remote_service_admin_http/private/src: export_registration_impl.c import_registration_impl.c remote_service_admin_impl.c
Date Sun, 23 Nov 2014 19:42:40 GMT
Author: bpetri
Date: Sun Nov 23 19:42:39 2014
New Revision: 1641254

URL: http://svn.apache.org/r1641254
Log:
CELIX-182 updated used enum types

Modified:
    celix/trunk/remote_services/remote_service_admin_http/private/src/export_registration_impl.c
    celix/trunk/remote_services/remote_service_admin_http/private/src/import_registration_impl.c
    celix/trunk/remote_services/remote_service_admin_http/private/src/remote_service_admin_impl.c

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=1641254&r1=1641253&r2=1641254&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
Sun Nov 23 19:42:39 2014
@@ -91,13 +91,13 @@ celix_status_t exportRegistration_stopTr
 	if (registration->endpointTracker != NULL) {
 		status = serviceTracker_close(registration->endpointTracker);
 		if (status != CELIX_SUCCESS) {
-		    logHelper_log(registration->loghelper, OSGI_FRAMEWORK_LOG_ERROR, "EXPORT_REGISTRATION:
Could not close endpoint tracker");
+		    logHelper_log(registration->loghelper, OSGI_LOGSERVICE_ERROR, "EXPORT_REGISTRATION:
Could not close endpoint tracker");
 		}
 	}
 	if (registration->tracker != NULL) {
 		status = serviceTracker_close(registration->tracker);
 		if (status != CELIX_SUCCESS) {
-			logHelper_log(registration->loghelper, OSGI_FRAMEWORK_LOG_ERROR, "EXPORT_REGISTRATION:
Could not close service tracker");
+			logHelper_log(registration->loghelper, OSGI_LOGSERVICE_ERROR, "EXPORT_REGISTRATION:
Could not close service tracker");
 		}
 	}
 

Modified: celix/trunk/remote_services/remote_service_admin_http/private/src/import_registration_impl.c
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/remote_service_admin_http/private/src/import_registration_impl.c?rev=1641254&r1=1641253&r2=1641254&view=diff
==============================================================================
--- celix/trunk/remote_services/remote_service_admin_http/private/src/import_registration_impl.c
(original)
+++ celix/trunk/remote_services/remote_service_admin_http/private/src/import_registration_impl.c
Sun Nov 23 19:42:39 2014
@@ -135,11 +135,11 @@ celix_status_t importRegistrationFactory
 	if (status == CELIX_SUCCESS) {
 		status = bundle_start(registration_factory->bundle);
 		if (status == CELIX_SUCCESS) {
-			logHelper_log(registration_factory->loghelper, OSGI_FRAMEWORK_LOG_INFO, "%s successfully
started.", name);
+			logHelper_log(registration_factory->loghelper, OSGI_LOGSERVICE_INFO, "%s successfully
started.", name);
 		}
 	}
 	else {
-		logHelper_log(registration_factory->loghelper, OSGI_FRAMEWORK_LOG_ERROR, "%s could not
be installed.", name);
+		logHelper_log(registration_factory->loghelper, OSGI_LOGSERVICE_ERROR, "%s could not
be installed.", name);
 	}
 
 	return status;
@@ -224,11 +224,11 @@ celix_status_t importRegistrationFactory
 	if ( (status = importRegistrationFactory_create(pool, serviceName, context, registration_factory))
== CELIX_SUCCESS) {
 		// starting the proxy tracker first allows us to pick up already available proxy factories
 		importRegistration_createProxyFactoryTracker(*registration_factory, &((*registration_factory)->proxyFactoryTracker));
-		logHelper_log((*registration_factory)->loghelper, OSGI_FRAMEWORK_LOG_INFO, "remoteServiceAdmin_importService:
new registration_factory added for %s at %p", serviceName, (*registration_factory)->proxyFactoryTracker);
+		logHelper_log((*registration_factory)->loghelper, OSGI_LOGSERVICE_INFO, "remoteServiceAdmin_importService:
new registration_factory added for %s at %p", serviceName, (*registration_factory)->proxyFactoryTracker);
 
 		// check whether factory is available
 		if (((*registration_factory)->trackedFactory == NULL) && ((status = importRegistrationFactory_open(*registration_factory))
!= CELIX_SUCCESS)) {
-			logHelper_log((*registration_factory)->loghelper, OSGI_FRAMEWORK_LOG_ERROR, "remoteServiceAdmin_importService:
cannot open registration_factory for %s.", serviceName);
+			logHelper_log((*registration_factory)->loghelper, OSGI_LOGSERVICE_ERROR, "remoteServiceAdmin_importService:
cannot open registration_factory for %s.", serviceName);
 			importRegistrationFactory_destroy(registration_factory);
 			serviceTracker_close((*registration_factory)->proxyFactoryTracker);
 		}

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=1641254&r1=1641253&r2=1641254&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
Sun Nov 23 19:42:39 2014
@@ -51,7 +51,9 @@
 #include "bundle.h"
 #include "service_reference.h"
 #include "service_registration.h"
-#include "celix_log.h"
+#include "log_helper.h"
+#include "log_service.h"
+
 
 // defines how often the webserver is restarted (with an increased port number)
 #define MAX_NUMBER_OF_RESTARTS 	5
@@ -124,7 +126,7 @@ celix_status_t remoteServiceAdmin_create
 
 			bundleContext_getProperty(context, "RSA_INTERFACE", &interface);
 			if ((interface != NULL) && (remoteServiceAdmin_getIpAdress(interface, &ip)
!= CELIX_SUCCESS)) {
-				logHelper_log((*admin)->loghelper, OSGI_FRAMEWORK_LOG_WARNING, "RSA: Could not retrieve
IP adress for interface %s", interface);
+				logHelper_log((*admin)->loghelper, OSGI_LOGSERVICE_WARNING, "RSA: Could not retrieve
IP adress for interface %s", interface);
 			}
 
 			if (ip == NULL) {
@@ -133,11 +135,11 @@ celix_status_t remoteServiceAdmin_create
 		}
 
 		if (ip != NULL) {
-			logHelper_log((*admin)->loghelper, OSGI_FRAMEWORK_LOG_INFO, "RSA: Using %s for service
annunciation", ip);
+			logHelper_log((*admin)->loghelper, OSGI_LOGSERVICE_INFO, "RSA: Using %s for service
annunciation", ip);
 			(*admin)->ip = apr_pstrdup(pool, ip);
 		}
 		else {
-			logHelper_log((*admin)->loghelper, OSGI_FRAMEWORK_LOG_WARNING, "RSA: No IP address
for service annunciation set. Using %s", DEFAULT_IP);
+			logHelper_log((*admin)->loghelper, OSGI_LOGSERVICE_WARNING, "RSA: No IP address for
service annunciation set. Using %s", DEFAULT_IP);
 			(*admin)->ip = (char*) DEFAULT_IP;
 		}
 
@@ -152,7 +154,7 @@ celix_status_t remoteServiceAdmin_create
 			(*admin)->ctx = mg_start(&callbacks, (*admin), options);
 
 			if ((*admin)->ctx != NULL) {
-				logHelper_log((*admin)->loghelper, OSGI_FRAMEWORK_LOG_INFO, "RSA: Start webserver:
%s", port);
+				logHelper_log((*admin)->loghelper, OSGI_LOGSERVICE_INFO, "RSA: Start webserver: %s",
port);
 				(*admin)->port = port;
 			}
 			else {
@@ -168,7 +170,7 @@ celix_status_t remoteServiceAdmin_create
 		        port_counter++;
 				snprintf(newPort, 6,  "%d", (currentPort+1));
 
-				logHelper_log((*admin)->loghelper, OSGI_FRAMEWORK_LOG_ERROR, "Error while starting
rsa server on port %s - retrying on port %s...", port, newPort);
+				logHelper_log((*admin)->loghelper, OSGI_LOGSERVICE_ERROR, "Error while starting rsa
server on port %s - retrying on port %s...", port, newPort);
 				port = newPort;
 			}
 		} while(((*admin)->ctx == NULL) && (port_counter < MAX_NUMBER_OF_RESTARTS));
@@ -210,7 +212,7 @@ celix_status_t remoteServiceAdmin_stop(r
     hashMapIterator_destroy(iter);
 
 	if (admin->ctx != NULL) {
-		logHelper_log(admin->loghelper, OSGI_FRAMEWORK_LOG_INFO, "RSA: Stopping webserver...");
+		logHelper_log(admin->loghelper, OSGI_LOGSERVICE_INFO, "RSA: Stopping webserver...");
 		mg_stop(admin->ctx);
 		admin->ctx = NULL;
 	}
@@ -323,7 +325,7 @@ celix_status_t remoteServiceAdmin_export
     }
 
 	if (reference == NULL) {
-		logHelper_log(admin->loghelper, OSGI_FRAMEWORK_LOG_ERROR, "ERROR: expected a reference
for service id %s.", serviceId);
+		logHelper_log(admin->loghelper, OSGI_LOGSERVICE_ERROR, "ERROR: expected a reference
for service id %s.", serviceId);
 		return CELIX_ILLEGAL_STATE;
 	}
 
@@ -333,9 +335,9 @@ celix_status_t remoteServiceAdmin_export
 	serviceReference_getProperty(reference, (char *) OSGI_FRAMEWORK_OBJECTCLASS, &provided);
 
 	if (exports == NULL || provided == NULL) {
-		logHelper_log(admin->loghelper, OSGI_FRAMEWORK_LOG_WARNING, "RSA: No Services to export.");
+		logHelper_log(admin->loghelper, OSGI_LOGSERVICE_WARNING, "RSA: No Services to export.");
 	} else {
-		logHelper_log(admin->loghelper, OSGI_FRAMEWORK_LOG_INFO, "RSA: Export services (%s)",
exports);
+		logHelper_log(admin->loghelper, OSGI_LOGSERVICE_INFO, "RSA: Export services (%s)", exports);
 		array_list_pt interfaces = NULL;
 		arrayList_create(&interfaces);
 		if (strcmp(utils_stringTrim(exports), "*") == 0) {
@@ -506,7 +508,7 @@ celix_status_t remoteServiceAdmin_getImp
 celix_status_t remoteServiceAdmin_importService(remote_service_admin_pt admin, endpoint_description_pt
endpointDescription, import_registration_pt *registration) {
 	celix_status_t status = CELIX_SUCCESS;
 
-	logHelper_log(admin->loghelper, OSGI_FRAMEWORK_LOG_INFO, "RSA: Import service %s", endpointDescription->service);
+	logHelper_log(admin->loghelper, OSGI_LOGSERVICE_INFO, "RSA: Import service %s", endpointDescription->service);
 
    import_registration_factory_pt registration_factory = (import_registration_factory_pt)
hashMap_get(admin->importedServices, endpointDescription->service);
 
@@ -522,7 +524,7 @@ celix_status_t remoteServiceAdmin_import
 	 // factory available
 	if (status != CELIX_SUCCESS || (registration_factory->trackedFactory == NULL))
 	{
-		logHelper_log(admin->loghelper, OSGI_FRAMEWORK_LOG_WARNING, "RSA: no proxyFactory available.");
+		logHelper_log(admin->loghelper, OSGI_LOGSERVICE_WARNING, "RSA: no proxyFactory available.");
 	}
 	else
 	{
@@ -545,7 +547,7 @@ celix_status_t remoteServiceAdmin_remove
     // factory available
     if ((registration_factory == NULL) || (registration_factory->trackedFactory == NULL))
     {
-    	logHelper_log(admin->loghelper, OSGI_FRAMEWORK_LOG_ERROR, "RSA: Error while retrieving
registration factory for imported service %s", endpointDescription->service);
+    	logHelper_log(admin->loghelper, OSGI_LOGSERVICE_ERROR, "RSA: Error while retrieving
registration factory for imported service %s", endpointDescription->service);
     }
     else
     {
@@ -555,7 +557,7 @@ celix_status_t remoteServiceAdmin_remove
 
 		if (arrayList_isEmpty(registration_factory->registrations))
 		{
-			logHelper_log(admin->loghelper, OSGI_FRAMEWORK_LOG_INFO, "RSA: closing proxy.");
+			logHelper_log(admin->loghelper, OSGI_LOGSERVICE_INFO, "RSA: closing proxy.");
 
 			serviceTracker_close(registration_factory->proxyFactoryTracker);
 			importRegistrationFactory_close(registration_factory);



Mime
View raw message