celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abroekh...@apache.org
Subject svn commit: r1650164 - /celix/trunk/log_service/private/src/log_entry.c
Date Wed, 07 Jan 2015 21:09:37 GMT
Author: abroekhuis
Date: Wed Jan  7 21:09:37 2015
New Revision: 1650164

URL: http://svn.apache.org/r1650164
Log:
CELIX-200: Updated log_entry to copy the symbolic name instead of only taking the pointer.

Modified:
    celix/trunk/log_service/private/src/log_entry.c

Modified: celix/trunk/log_service/private/src/log_entry.c
URL: http://svn.apache.org/viewvc/celix/trunk/log_service/private/src/log_entry.c?rev=1650164&r1=1650163&r2=1650164&view=diff
==============================================================================
--- celix/trunk/log_service/private/src/log_entry.c (original)
+++ celix/trunk/log_service/private/src/log_entry.c Wed Jan  7 21:09:37 2015
@@ -57,7 +57,11 @@ celix_status_t logEntry_create(bundle_pt
     	module_pt module = NULL;
         status = bundle_getCurrentModule(bundle, &module);
 		if (status == CELIX_SUCCESS) {
-			status = module_getSymbolicName(module, &(*entry)->bundleSymbolicName);
+			char *symbolicName = NULL;
+			status = module_getSymbolicName(module, &symbolicName);
+			if (status == CELIX_SUCCESS) {
+				(*entry)->bundleSymbolicName = strdup(symbolicName);
+			}
 		}
     }
 
@@ -66,6 +70,7 @@ celix_status_t logEntry_create(bundle_pt
 
 celix_status_t logEntry_destroy(log_entry_pt *entry) {
     if (*entry) {
+    	free((*entry)->bundleSymbolicName);
         free((*entry)->message);
         free(*entry);
         *entry = NULL;



Mime
View raw message