celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpe...@apache.org
Subject svn commit: r1621677 [2/2] - in /celix/trunk: deployment_admin/private/src/ device_access/device_access/private/src/ event_admin/event_admin/private/src/ event_admin/event_handler/private/src/ event_admin/event_publisher/private/src/ framework/private/...
Date Mon, 01 Sep 2014 05:46:08 GMT
Modified: celix/trunk/remote_services/remote_service_admin_shm/private/src/remote_service_admin_impl.c
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/remote_service_admin_shm/private/src/remote_service_admin_impl.c?rev=1621677&r1=1621676&r2=1621677&view=diff
==============================================================================
--- celix/trunk/remote_services/remote_service_admin_shm/private/src/remote_service_admin_impl.c
(original)
+++ celix/trunk/remote_services/remote_service_admin_shm/private/src/remote_service_admin_impl.c
Mon Sep  1 05:46:07 2014
@@ -404,7 +404,7 @@ static void *APR_THREAD_FUNC remoteServi
 							}
 							else
 							{
-								printf("RSA : receiveFromSharedMemory : No endpoint set for %s\n", export->endpointDescription->service
);
+								fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "RSA : receiveFromSharedMemory : No endpoint
set for %s.", export->endpointDescription->service );
 							}
 						}
 					}
@@ -441,17 +441,17 @@ celix_status_t remoteServiceAdmin_getSha
 
 		if (fopen(outFile, "wb") == NULL)
 		{
-				printf("RSA: error while creating shared identifier file %s (%s)", outFile, strerror(errno));
+			fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "RSA: error while creating shared identifier
file %s (%s)", outFile, strerror(errno));
 				status = CELIX_FILE_IO_EXCEPTION;
 		}
 		else
 		{
-			printf("RSA:create shared identifier file %s", outFile);
+			fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "RSA:create shared identifier file %s", outFile);
 		}
 	}
 	else
 	{
-		printf("RSA: shared identifier file %s already exists", outFile);
+		fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "RSA: shared identifier file %s already exists",
outFile);
 	}
 
 	return status;
@@ -465,12 +465,12 @@ celix_status_t remoteServiceAdmin_remove
 
 	if (access(tmpPath, F_OK) == 0)
 	{
-		printf("RSA: removing shared identifier file %s", tmpPath);
+		fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "RSA: removing shared identifier file %s", tmpPath);
 		unlink(tmpPath);
 	}
 	else
 	{
-		printf("RSA: cannot remove shared identifier file %s", tmpPath);
+		fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "RSA: cannot remove shared identifier file %s",
tmpPath);
 	}
 
 	return status;
@@ -509,8 +509,9 @@ celix_status_t remoteServiceAdmin_remove
 
 				snprintf(f_name, len, "%s/%s", tmpDir, p->d_name);
 
-				if (!stat(f_name, &statbuf)) {
-						printf("RSA: removing shared identifier file %s (unproper clean-up?)", f_name);
+				if (!stat(f_name, &statbuf))
+				{
+						fw_log(logger, OSGI_FRAMEWORK_LOG_WARNING, "RSA: removing shared identifier file %s
(unproper clean-up?)", f_name);
 						retVal = unlink(f_name);
 				}
 			}
@@ -561,7 +562,7 @@ celix_status_t remoteServiceAdmin_export
 
     if (reference == NULL)
     {
-        printf("ERROR: expected a reference for service id %s\n", serviceId);
+    	fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "ERROR: expected a reference for service id
%s.", serviceId);
         return CELIX_ILLEGAL_STATE;
     }
 
@@ -573,11 +574,11 @@ celix_status_t remoteServiceAdmin_export
 
     if (exports == NULL || provided == NULL)
     {
-        printf("RSA: No Services to export.\n");
+    	fw_log(logger, OSGI_FRAMEWORK_LOG_WARNING, "RSA: No Services to export.");
     }
     else
     {
-        printf("RSA: Export services (%s)\n", exports);
+    	fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "RSA: Export services (%s).", exports);
         array_list_pt interfaces = NULL;
         arrayList_create(&interfaces);
         if (strcmp(utils_stringTrim(exports), "*") == 0)
@@ -750,22 +751,22 @@ celix_status_t remoteServiceAdmin_create
 
     if ((shmPath = properties_get(endpointProperties, (char *) RSA_SHM_PATH_PROPERTYNAME))
== NULL)
     {
-        printf("RSA : No value found for key %s in endpointProperties\n", RSA_SHM_PATH_PROPERTYNAME);
+    	fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "RSA : No value found for key %s in endpointProperties.",
RSA_SHM_PATH_PROPERTYNAME);
         status = CELIX_BUNDLE_EXCEPTION;
     }
     else if ((shmFtokId = properties_get(endpointProperties, (char *) RSA_SHM_FTOK_ID_PROPERTYNAME))
== NULL)
     {
-        printf("RSA : No value found for key %s in endpointProperties\n", RSA_SHM_FTOK_ID_PROPERTYNAME);
+    	fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "RSA : No value found for key %s in endpointProperties.",
RSA_SHM_FTOK_ID_PROPERTYNAME);
         status = CELIX_BUNDLE_EXCEPTION;
     }
     else if ((semPath = properties_get(endpointProperties, (char *) RSA_SEM_PATH_PROPERTYNAME))
== NULL)
     {
-        printf("RSA : No value found for key %s in endpointProperties\n", RSA_SEM_PATH_PROPERTYNAME);
+    	fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "RSA : No value found for key %s in endpointProperties.",
RSA_SEM_PATH_PROPERTYNAME);
         status = CELIX_BUNDLE_EXCEPTION;
     }
     else if ((semFtokId = properties_get(endpointProperties, (char *) RSA_SEM_FTOK_ID_PROPERTYNAME))
== NULL)
     {
-        printf("RSA : No value found for key %s in endpointProperties\n", RSA_SEM_FTOK_ID_PROPERTYNAME);
+    	fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "RSA : No value found for key %s in endpointProperties.",
RSA_SEM_FTOK_ID_PROPERTYNAME);
         status = CELIX_BUNDLE_EXCEPTION;
     }
     else
@@ -781,28 +782,28 @@ celix_status_t remoteServiceAdmin_create
             {
                 if ((ipc->shmId = shmget(shmKey, RSA_SHM_MEMSIZE, IPC_CREAT | 0666)) <
0)
                 {
-                    printf("RSA : Creation of shared memory segment failed\n");
+                	fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "RSA : Creation of shared memory
segment failed.");
                     status = CELIX_BUNDLE_EXCEPTION;
                 }
                 else if ((ipc->shmBaseAdress = shmat(ipc->shmId, 0, 0)) == (char *)
- 1 )
                 {
-                    printf("RSA : Attaching of shared memory segment failed\n");
+                	fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "RSA : Attaching of shared memory
segment failed.");
                     status = CELIX_BUNDLE_EXCEPTION;
                 }
                 else
                 {
-                    printf("RSA : shared memory segment sucessfully created at %p \n", ipc->shmBaseAdress);
+                	fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "RSA : shared memory segment sucessfully
created at %p.", ipc->shmBaseAdress);
                 }
             }
         }
         else if ((ipc->shmBaseAdress = shmat(ipc->shmId, 0, 0)) == (char *) - 1 )
         {
-            printf("RSA : Attaching of shared memory segment failed\n");
+        	fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "RSA : Attaching to shared memory segment
failed.");
             status = CELIX_BUNDLE_EXCEPTION;
         }
         else
         {
-            printf("RSA : sucessfully attached to shared memory at %p \n", ipc->shmBaseAdress);
+        	fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "RSA : sucessfully attached to shared memory
at %p.", ipc->shmBaseAdress);
         }
     }
 
@@ -816,17 +817,17 @@ celix_status_t remoteServiceAdmin_create
         {
 			// only reset semaphores if a create was supposed
 			if ((createIfNotFound == true) && ((semctl(semid, 0, SETVAL, (int) 1) == -1) ||
(semctl(semid, 1, SETVAL, (int) 0) == -1) || (semctl(semid, 2, SETVAL, (int) 0) == -1))) {
-					printf("RSA : error while initialize semaphores \n");
+				fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "RSA : error while initialize semaphores.");
 			}
 
-            printf("RSA : semaphores w/ key %s and id %i added \n", endpointDescription->service,
semid);
+			fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "RSA : semaphores w/ key %s and id %i added.",
endpointDescription->service, semid);
             ipc->semId = semid;
 
             hashMap_put(ipcSegment, endpointDescription->service, ipc);
         }
         else
         {
-            printf("RSA : error getting semaphores.\n");
+        	fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "RSA : error getting semaphores.");
             status = CELIX_BUNDLE_EXCEPTION;
         }
     }
@@ -953,7 +954,7 @@ celix_status_t remoteServiceAdmin_import
 {
     celix_status_t status = CELIX_SUCCESS;
 
-    printf("\n\nRSA: Import service %s\n", endpointDescription->service);
+    fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "RSA: Import service %s.", endpointDescription->service);
 
     import_registration_factory_pt registration_factory = (import_registration_factory_pt)
hashMap_get(admin->importedServices, endpointDescription->service);
 
@@ -967,7 +968,7 @@ celix_status_t remoteServiceAdmin_import
 	 // factory available
 	if (status != CELIX_SUCCESS || (registration_factory->trackedFactory == NULL))
 	{
-		printf("RSA: no proxyFactory available.\n");
+		fw_log(logger, OSGI_FRAMEWORK_LOG_WARNING, "RSA: no proxyFactory available.");
 	}
 	else
 	{
@@ -997,17 +998,17 @@ celix_status_t remoteServiceAdmin_remove
         // detach from IPC
         if(remoteServiceAdmin_getIpcSegment(admin, endpointDescription, &ipc) != CELIX_SUCCESS)
         {
-        	printf("RSA: Error while retrieving IPC segment for imported service %s\n", endpointDescription->service);
+        	fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "RSA: Error while retrieving IPC segment
for imported service %s.", endpointDescription->service);
         }
         else if (remoteServiceAdmin_detachIpcSegment(ipc) != CELIX_SUCCESS)
         {
-        	printf("RSA: Error while detaching IPC segment for imported service %s\n", endpointDescription->service);
+        	fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "RSA: Error while detaching IPC segment
for imported service %s.", endpointDescription->service);
         }
 
 		// factory available
 		if ((registration_factory == NULL) || (registration_factory->trackedFactory == NULL))
 		{
-			printf("RSA: Error while retrieving registration factory for imported service %s\n", endpointDescription->service);
+			fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "RSA: Error while retrieving registration factory
for imported service %s.", endpointDescription->service);
 		}
 		else
 		{
@@ -1017,7 +1018,7 @@ celix_status_t remoteServiceAdmin_remove
 
 			if (arrayList_isEmpty(registration_factory->registrations) == true)
 			{
-				printf("RSA: closing proxy\n");
+				fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "RSA: closing proxy");
 
 				serviceTracker_close(registration_factory->proxyFactoryTracker);
 				importRegistrationFactory_close(registration_factory);

Modified: celix/trunk/remote_services/topology_manager/private/src/activator.c
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/topology_manager/private/src/activator.c?rev=1621677&r1=1621676&r2=1621677&view=diff
==============================================================================
--- celix/trunk/remote_services/topology_manager/private/src/activator.c (original)
+++ celix/trunk/remote_services/topology_manager/private/src/activator.c Mon Sep  1 05:46:07
2014
@@ -123,7 +123,7 @@ celix_status_t bundleActivator_start(voi
 	char *uuid = NULL;
 	status = bundleContext_getProperty(activator->context, (char *)OSGI_FRAMEWORK_FRAMEWORK_UUID,
&uuid);
 	if (!uuid) {
-		printf("TOPOLOGY_MANAGER: no framework UUID defined?!\n");
+		fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "TOPOLOGY_MANAGER: no framework UUID defined?!");
 		return CELIX_ILLEGAL_STATE;
 	}
 
@@ -135,7 +135,7 @@ celix_status_t bundleActivator_start(voi
 
 	snprintf(scope, len, "(&(%s=*)(!(%s=%s)))", OSGI_FRAMEWORK_OBJECTCLASS, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID,
uuid);
 
-	printf("TOPOLOGY_MANAGER: endpoint listener scope is %s\n", scope);
+	fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "TOPOLOGY_MANAGER: endpoint listener scope is %s",
scope);
 
 	properties_pt props = properties_create();
 	properties_set(props, (char *) OSGI_ENDPOINT_LISTENER_SCOPE, scope);

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=1621677&r1=1621676&r2=1621677&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 Mon Sep  1
05:46:07 2014
@@ -137,7 +137,7 @@ celix_status_t topologyManager_rsaAdded(
 	celix_status_t status = CELIX_SUCCESS;
 	topology_manager_pt manager = handle;
 
-	printf("TOPOLOGY_MANAGER: Added RSA\n");
+	fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "TOPOLOGY_MANAGER: Added RSA");
 
 	status = celixThreadMutex_lock(&manager->rsaListLock);
 	arrayList_add(manager->rsaList, service);
@@ -161,7 +161,7 @@ celix_status_t topologyManager_rsaRemove
 	celix_status_t status = CELIX_SUCCESS;
 	topology_manager_pt manager = handle;
 
-	printf("TOPOLOGY_MANAGER: Removed RSA\n");
+	fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "TOPOLOGY_MANAGER: Removed RSA");
 
 	status = celixThreadMutex_lock(&manager->rsaListLock);
 	arrayList_removeElement(manager->rsaList, service);
@@ -228,7 +228,7 @@ celix_status_t topologyManager_addImport
 	celix_status_t status = CELIX_SUCCESS;
 	topology_manager_pt manager = handle;
 
-	printf("TOPOLOGY_MANAGER: Add imported service (%s; %s)...\n", endpoint->service, endpoint->id);
+	fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "TOPOLOGY_MANAGER: Add imported service (%s; %s).",
endpoint->service, endpoint->id);
 
 	// Create a local copy of the current list of RSAs, to ensure we do not run into threading
issues...
 	array_list_pt localRSAs = NULL;
@@ -259,7 +259,7 @@ celix_status_t topologyManager_removeImp
 	celix_status_t status = CELIX_SUCCESS;
 	topology_manager_pt manager = handle;
 
-	printf("TOPOLOGY_MANAGER: Remove imported service (%s; %s)...\n", endpoint->service,
endpoint->id);
+	fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "TOPOLOGY_MANAGER: Remove imported service (%s;
%s).", endpoint->service, endpoint->id);
 
 	status = celixThreadMutex_lock(&manager->importedServicesLock);
 
@@ -290,7 +290,7 @@ celix_status_t topologyManager_removeImp
 celix_status_t topologyManager_addExportedService(topology_manager_pt manager, service_reference_pt
reference, char *serviceId) {
 	celix_status_t status = CELIX_SUCCESS;
 
-	printf("TOPOLOGY_MANAGER: Add exported service (%s)...\n", serviceId);
+	fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "TOPOLOGY_MANAGER: Add exported service (%s).",
serviceId);
 
 	// Create a local copy of the current list of RSAs, to ensure we do not run into threading
issues...
 	array_list_pt localRSAs = NULL;
@@ -322,7 +322,7 @@ celix_status_t topologyManager_addExport
 celix_status_t topologyManager_removeExportedService(topology_manager_pt manager, service_reference_pt
reference, char *serviceId) {
 	celix_status_t status = CELIX_SUCCESS;
 
-	printf("TOPOLOGY_MANAGER: Remove exported service (%s)...\n", serviceId);
+	fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "TOPOLOGY_MANAGER: Remove exported service (%s).",
serviceId);
 
 	status = celixThreadMutex_lock(&manager->exportedServicesLock);
 
@@ -459,7 +459,7 @@ celix_status_t topologyManager_extendFil
 	char* uuid = NULL;
 	status = bundleContext_getProperty(context, (char *)OSGI_FRAMEWORK_FRAMEWORK_UUID, &uuid);
 	if (!uuid) {
-		printf("TOPOLOGY_MANAGER: no framework UUID defined?!\n");
+		fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "TOPOLOGY_MANAGER: no framework UUID defined?!");
 		return CELIX_BUNDLE_EXCEPTION;
 	}
 
@@ -485,11 +485,11 @@ celix_status_t topologyManager_listenerA
 		bundleContext_getBundle(info->context, &bundle);
 		bundleContext_getBundle(manager->context, &self);
 		if (bundle == self) {
-			printf("TOPOLOGY_MANAGER: Ignore myself\n");
+			fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "TOPOLOGY_MANAGER: Ignore myself.");
 			continue;
 		}
 
-		printf("TOPOLOGY_MANAGER: listener with filter \"%s\" added\n", info->filter);
+		fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "TOPOLOGY_MANAGER: listener with filter \"%s\"
added", info->filter);
 
 		char *filter = NULL;
 		topologyManager_extendFilter(manager->context, info->filter, &filter);
@@ -523,11 +523,11 @@ celix_status_t topologyManager_listenerR
 		bundleContext_getBundle(info->context, &bundle);
 		bundleContext_getBundle(manager->context, &self);
 		if (bundle == self) {
-			printf("TOPOLOGY_MANAGER: Ignore myself\n");
+			fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "TOPOLOGY_MANAGER: Ignore myself.");
 			continue;
 		}
 
-		printf("TOPOLOGY_MANAGER: listener with filter \"%s\" removed\n", info->filter);
+		fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "TOPOLOGY_MANAGER: listener with filter \"%s\"
removed.", info->filter);
 
 		char *filter = NULL;
 		topologyManager_extendFilter(manager->context, info->filter, &filter);

Modified: celix/trunk/remote_shell/private/src/connection_listener.c
URL: http://svn.apache.org/viewvc/celix/trunk/remote_shell/private/src/connection_listener.c?rev=1621677&r1=1621676&r2=1621677&view=diff
==============================================================================
--- celix/trunk/remote_shell/private/src/connection_listener.c (original)
+++ celix/trunk/remote_shell/private/src/connection_listener.c Mon Sep  1 05:46:07 2014
@@ -95,7 +95,7 @@ celix_status_t connectionListener_stop(c
 	apr_thread_t *thread = NULL;
 	apr_pollset_t *pollset = NULL;
 
-	printf("CONNECTION_LISTENER: Stopping thread\n");
+	fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "CONNECTION_LISTENER: Stopping thread\n");
 
 	apr_thread_mutex_lock(instance->mutex);
 	thread=instance->thread;
@@ -108,18 +108,18 @@ celix_status_t connectionListener_stop(c
 		apr_status_t stat = APR_SUCCESS;
 		char error[512];
 
-		printf("Stopping thread by waking poll on listen socket\n");
+		fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "Stopping thread by waking poll on listen socket\n");
 		stat = apr_pollset_wakeup(pollset);
 		
 		apr_strerror(stat, error, 512);
-		printf("Got error %s\n", error);
+		fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "Got error %s.", error);
 
 		apr_thread_join(&threadStatus, thread);
-		printf("Done joining thread\n");
+		fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "Done joining thread.");
 	} else if (thread != NULL) {
-		printf("Cannot stop thread\n");
+		fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "Cannot stop thread.");
 	} else {
-		printf("No running thread\n");
+		fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "No running thread.");
 	}
 
 	return status;
@@ -154,9 +154,9 @@ static void* APR_THREAD_FUNC connection_
     if (status != APR_SUCCESS) {
     	char error[64];
 		apr_strerror(status, error, 64);
-    	printf("Error creating and listing on socket: %s\n", error);
+		fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "Error creating and listing on socket: %s.", error);
     } else {
-    	printf("Remote Shell accepting connections on port %li\n", instance->port);
+    	fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "Remote Shell accepting connections on port
%ld", instance->port);
     }
 
 	while (status == APR_SUCCESS) {
@@ -169,19 +169,19 @@ static void* APR_THREAD_FUNC connection_
 			apr_pool_create(&socketPool, instance->pool);
 			socketStatus = apr_socket_accept(&acceptedSocket, listenSocket, socketPool);
 
-			printf("REMOTE_SHELL: created connection socket\n");
+			fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "REMOTE_SHELL: created connection socket.");
 			if (socketStatus == APR_SUCCESS) {
 				remoteShell_addConnection(instance->remoteShell, acceptedSocket);
 			} else {
 				apr_pool_destroy(socketPool);
-				printf("Could not accept connection\n");
+				fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "REMOTE_SHELL: Could not accept connection.");
 			}
 		} else if (status == APR_EINTR) {
-			printf("Poll interrupted\n");
+			fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "REMOTE_SHELL: Poll interrupted.");
 		} else /*error*/ {
 			char error[64];
 			apr_strerror(status, error, 64);
-			printf("Got error %s\n", error);
+			fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "REMOTE_SHELL: Got error %s.", error);
 			break;
 		}
 	}

Modified: celix/trunk/remote_shell/private/src/remote_shell.c
URL: http://svn.apache.org/viewvc/celix/trunk/remote_shell/private/src/remote_shell.c?rev=1621677&r1=1621676&r2=1621677&view=diff
==============================================================================
--- celix/trunk/remote_shell/private/src/remote_shell.c (original)
+++ celix/trunk/remote_shell/private/src/remote_shell.c Mon Sep  1 05:46:07 2014
@@ -149,7 +149,7 @@ celix_status_t remoteShell_stopConnectio
 		wakeupStatus = apr_pollset_wakeup(connection->pollset);
 		if (wakeupStatus != APR_SUCCESS) {
 			apr_strerror(wakeupStatus, error, 64);
-			printf("Error waking up connection %i: '%s'\n", i, error);
+			fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "REMOTE_SHELLE: Error waking up connection %i:
'%s'", i, error);
 		}
 	}
 	apr_thread_mutex_unlock(instance->mutex);
@@ -195,20 +195,20 @@ void *APR_THREAD_FUNC remoteShell_connec
 			} else {
 				char error[64];
 				apr_strerror(status, error, 64);
-				printf("Got error %s\n", error);
+				fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "REMOTE_SHELL: Got error %s", error);
 			}
 		} else if (status == APR_EINTR) {
-			printf("Poll interrupted\n");
+			fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "REMOTE_SHELL: Poll interrupted.");
 		} else /*error*/ {
 			char error[64];
 			apr_strerror(status, error, 64);
-			printf("Got error %s\n", error);
+			fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "REMOTE_SHELL: Got error %s", error);
 			break;
 		}
 	}
 	remoteShell_connection_print(connection, RS_GOODBYE);
 
-	printf("Closing socket\n");
+	fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "REMOTE_SHELL: Closing socket");
 	apr_thread_mutex_lock(connection->parent->mutex);
 	arrayList_removeElement(connection->parent->connections, connection);
 	apr_thread_mutex_unlock(connection->parent->mutex);

Modified: celix/trunk/shell/private/src/inspect_command.c
URL: http://svn.apache.org/viewvc/celix/trunk/shell/private/src/inspect_command.c?rev=1621677&r1=1621676&r2=1621677&view=diff
==============================================================================
--- celix/trunk/shell/private/src/inspect_command.c (original)
+++ celix/trunk/shell/private/src/inspect_command.c Mon Sep  1 05:46:07 2014
@@ -176,7 +176,7 @@ celix_status_t inspectCommand_printExpor
 									hash_map_iterator_pt iter = hashMapIterator_create(props);
 									while (hashMapIterator_hasNext(iter)) {
 									    hash_map_entry_pt entry = hashMapIterator_nextEntry(iter);
-									    sprintf(line, "%s = %s\n", hashMapEntry_getKey(entry), hashMapEntry_getValue(entry));
+									    sprintf(line, "%s = %s\n", (char*) hashMapEntry_getKey(entry), (char*) hashMapEntry_getValue(entry));
 									    out(line);
 									}
 									hashMapIterator_destroy(iter);
@@ -275,7 +275,7 @@ celix_status_t inspectCommand_printImpor
                                     hash_map_iterator_pt iter = hashMapIterator_create(props);
                                     while (hashMapIterator_hasNext(iter)) {
                                         hash_map_entry_pt entry = hashMapIterator_nextEntry(iter);
-                                        sprintf(line, "%s = %s\n", hashMapEntry_getKey(entry),
hashMapEntry_getValue(entry));
+                                        sprintf(line, "%s = %s\n", (char*) hashMapEntry_getKey(entry),
(char*) hashMapEntry_getValue(entry));
                                         out(line);
                                     }
 									hashMapIterator_destroy(iter);



Mime
View raw message