You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by ab...@apache.org on 2015/01/07 22:09:37 UTC
svn commit: r1650164 - /celix/trunk/log_service/private/src/log_entry.c
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;