celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpe...@apache.org
Subject celix git commit: CELIX-287: remove bundle pointer from framework_event/bundle_event
Date Thu, 05 Nov 2015 06:47:42 GMT
Repository: celix
Updated Branches:
  refs/heads/develop fe59e3e90 -> 736af0e44


CELIX-287: remove bundle pointer from framework_event/bundle_event


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/736af0e4
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/736af0e4
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/736af0e4

Branch: refs/heads/develop
Commit: 736af0e443f3a547c74ff48b05c7a3faad8ac0ca
Parents: fe59e3e
Author: Bjoern Petri <bpetri@apache.org>
Authored: Thu Nov 5 07:46:51 2015 +0100
Committer: Bjoern Petri <bpetri@apache.org>
Committed: Thu Nov 5 07:46:51 2015 +0100

----------------------------------------------------------------------
 framework/private/src/framework.c          | 251 ++++++++++++++----------
 framework/public/include/bundle_event.h    |   3 +-
 framework/public/include/framework_event.h |   3 +-
 log_service/private/src/log.c              |  17 +-
 log_service/private/src/log_entry.c        |  22 +--
 log_service/private/src/log_factory.c      |   2 +-
 log_service/private/src/log_service_impl.c |  23 ++-
 log_service/public/include/log_entry.h     |   4 +-
 log_service/public/src/log_helper.c        |   4 +-
 9 files changed, 192 insertions(+), 137 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/736af0e4/framework/private/src/framework.c
----------------------------------------------------------------------
diff --git a/framework/private/src/framework.c b/framework/private/src/framework.c
index a042343..5ca35a5 100644
--- a/framework/private/src/framework.c
+++ b/framework/private/src/framework.c
@@ -154,7 +154,8 @@ struct request {
 	array_list_pt listeners;
 
 	int eventType;
-	bundle_pt bundle;
+	long bundleId;
+	char* bundleSymbolicName;
 	celix_status_t errorCode;
 	char *error;
 
@@ -2171,33 +2172,60 @@ celix_status_t fw_fireBundleEvent(framework_pt framework, bundle_event_type_e
ev
 	if ((eventType != OSGI_FRAMEWORK_BUNDLE_EVENT_STARTING)
 			&& (eventType != OSGI_FRAMEWORK_BUNDLE_EVENT_STOPPING)
 			&& (eventType != OSGI_FRAMEWORK_BUNDLE_EVENT_LAZY_ACTIVATION)) {
-		request_pt request = (request_pt) malloc(sizeof(*request));
+		request_pt request = (request_pt) calloc(1, sizeof(*request));
 		if (!request) {
 			status = CELIX_ENOMEM;
-		} else {
-			request->bundle = bundle;
-			request->eventType = eventType;
-			request->filter = NULL;
-			request->listeners = framework->bundleListeners;
-			request->type = BUNDLE_EVENT_TYPE;
-			request->error = NULL;
-
-			if (celixThreadMutex_lock(&framework->dispatcherLock) != CELIX_SUCCESS) {
-				status = CELIX_FRAMEWORK_EXCEPTION;
-			} else {
-			    arrayList_add(framework->requests, request);
-				if (celixThreadCondition_broadcast(&framework->dispatcher)) {
-					status = CELIX_FRAMEWORK_EXCEPTION;
-				} else {
-					if (celixThreadMutex_unlock(&framework->dispatcherLock)) {
-						status = CELIX_FRAMEWORK_EXCEPTION;
-					}
-				}
-			}
-		}
-	}
+        } else {
+            bundle_archive_pt archive = NULL;
+            module_pt module = NULL;
+
+            request->eventType = eventType;
+            request->filter = NULL;
+            request->listeners = framework->bundleListeners;
+            request->type = BUNDLE_EVENT_TYPE;
+            request->error = NULL;
+            request->bundleId = -1;
+
+            status = bundle_getArchive(bundle, &archive);
+
+            if (status == CELIX_SUCCESS) {
+                long bundleId;
+
+                status = bundleArchive_getId(archive, &bundleId);
+
+                if (status == CELIX_SUCCESS) {
+                    request->bundleId = bundleId;
+                }
+            }
+
+            if (status == CELIX_SUCCESS) {
+                status = bundle_getCurrentModule(bundle, &module);
+
+                if (status == CELIX_SUCCESS) {
+                    char *symbolicName = NULL;
+                    status = module_getSymbolicName(module, &symbolicName);
+                    if (status == CELIX_SUCCESS) {
+                        request->bundleSymbolicName = strdup(symbolicName);
+                    }
+                }
+            }
+
+            if (celixThreadMutex_lock(&framework->dispatcherLock) != CELIX_SUCCESS)
{
+                status = CELIX_FRAMEWORK_EXCEPTION;
+            } else {
+                arrayList_add(framework->requests, request);
+                if (celixThreadCondition_broadcast(&framework->dispatcher)) {
+                    status = CELIX_FRAMEWORK_EXCEPTION;
+                } else {
+                    if (celixThreadMutex_unlock(&framework->dispatcherLock)) {
+                        status = CELIX_FRAMEWORK_EXCEPTION;
+                    }
+                }
+            }
+        }
+    }
 
-	framework_logIfError(framework->logger, status, NULL, "Failed to fire bundle event");
+    framework_logIfError(framework->logger, status, NULL, "Failed to fire bundle event");
 
 	return status;
 }
@@ -2209,33 +2237,60 @@ celix_status_t fw_fireFrameworkEvent(framework_pt framework, framework_event_typ
 	if (!request) {
 		status = CELIX_ENOMEM;
 	} else {
-		request->bundle = bundle;
-		request->eventType = eventType;
-		request->filter = NULL;
-		request->listeners = framework->frameworkListeners;
-		request->type = FRAMEWORK_EVENT_TYPE;
-		request->errorCode = errorCode;
-		request->error = "";
-
-		if (errorCode != CELIX_SUCCESS) {
-		    char message[256];
+        bundle_archive_pt archive = NULL;
+        module_pt module = NULL;
+
+        request->eventType = eventType;
+        request->filter = NULL;
+        request->listeners = framework->frameworkListeners;
+        request->type = FRAMEWORK_EVENT_TYPE;
+        request->errorCode = errorCode;
+        request->error = "";
+        request->bundleId = -1;
+
+        status = bundle_getArchive(bundle, &archive);
+
+        if (status == CELIX_SUCCESS) {
+            long bundleId;
+
+            status = bundleArchive_getId(archive, &bundleId);
+
+            if (status == CELIX_SUCCESS) {
+                request->bundleId = bundleId;
+            }
+        }
+
+        if (status == CELIX_SUCCESS) {
+            status = bundle_getCurrentModule(bundle, &module);
+
+            if (status == CELIX_SUCCESS) {
+                char *symbolicName = NULL;
+                status = module_getSymbolicName(module, &symbolicName);
+                if (status == CELIX_SUCCESS) {
+                    request->bundleSymbolicName = strdup(symbolicName);
+                }
+            }
+        }
+
+        if (errorCode != CELIX_SUCCESS) {
+            char message[256];
             celix_strerror(errorCode, message, 256);
             request->error = message;
-		}
+        }
 
-		if (celixThreadMutex_lock(&framework->dispatcherLock) != CELIX_SUCCESS) {
-			status = CELIX_FRAMEWORK_EXCEPTION;
-		} else {
-		    arrayList_add(framework->requests, request);
-			if (celixThreadCondition_broadcast(&framework->dispatcher)) {
-				status = CELIX_FRAMEWORK_EXCEPTION;
-			} else {
-				if (celixThreadMutex_unlock(&framework->dispatcherLock)) {
-					status = CELIX_FRAMEWORK_EXCEPTION;
-				}
-			}
-		}
-	}
+        if (celixThreadMutex_lock(&framework->dispatcherLock) != CELIX_SUCCESS) {
+            status = CELIX_FRAMEWORK_EXCEPTION;
+        } else {
+            arrayList_add(framework->requests, request);
+            if (celixThreadCondition_broadcast(&framework->dispatcher)) {
+                status = CELIX_FRAMEWORK_EXCEPTION;
+            } else {
+                if (celixThreadMutex_unlock(&framework->dispatcherLock)) {
+                    status = CELIX_FRAMEWORK_EXCEPTION;
+                }
+            }
+        }
+    }
 
 	framework_logIfError(framework->logger, status, NULL, "Failed to fire framework event");
 
@@ -2244,8 +2299,6 @@ celix_status_t fw_fireFrameworkEvent(framework_pt framework, framework_event_typ
 
 static void *fw_eventDispatcher(void *fw) {
 	framework_pt framework = (framework_pt) fw;
-	//request_pt request = NULL;
-	struct request req;
 
 	while (true) {
 		int size;
@@ -2271,14 +2324,6 @@ static void *fw_eventDispatcher(void *fw) {
 		}
 
 		request_pt request = (request_pt) arrayList_remove(framework->requests, 0);
-		bool validReq=false;
-		if(request!=NULL){
-			memset(&req,0,sizeof(struct request));
-			memcpy(&req,request,sizeof(struct request));
-			free(request);
-			request=&req;
-			validReq=true;
-		}
 
 		if ((status = celixThreadMutex_unlock(&framework->dispatcherLock)) != 0) {
 			fw_log(framework->logger, OSGI_FRAMEWORK_LOG_ERROR,  "Error unlocking the dispatcher.");
@@ -2286,51 +2331,53 @@ static void *fw_eventDispatcher(void *fw) {
 			return NULL;
 		}
 
-		if (validReq) {
-			if (celixThreadMutex_lock(&framework->bundleListenerLock) != CELIX_SUCCESS) {
-				status = CELIX_FRAMEWORK_EXCEPTION;
-			}
-			else if (celixThreadMutex_lock(&framework->bundleLock) != CELIX_SUCCESS) {
-				celixThreadMutex_unlock(&framework->bundleListenerLock);
-				status = CELIX_FRAMEWORK_EXCEPTION;
-			}
-			else {
-				int i;
-				int size = arrayList_size(request->listeners);
-				for (i = 0; i < size; i++) {
-					if (request->type == BUNDLE_EVENT_TYPE) {
-						fw_bundle_listener_pt listener = (fw_bundle_listener_pt) arrayList_get(request->listeners,
i);
-						bundle_event_pt event = (bundle_event_pt) malloc(sizeof(*event));
-						event->bundle = request->bundle;
-						event->type = request->eventType;
-
-						fw_invokeBundleListener(framework, listener->listener, event, listener->bundle);
-
-						free(event);
-					} else if (request->type == FRAMEWORK_EVENT_TYPE) {
-						fw_framework_listener_pt listener = (fw_framework_listener_pt) arrayList_get(request->listeners,
i);
-						framework_event_pt event = (framework_event_pt) malloc(sizeof(*event));
-						event->bundle = request->bundle;
-						event->type = request->eventType;
-						event->error = request->error;
-						event->errorCode = request->errorCode;
-
-						fw_invokeFrameworkListener(framework, listener->listener, event, listener->bundle);
-
-						free(event);
-					}
-				}
+        if (celixThreadMutex_lock(&framework->bundleListenerLock) != CELIX_SUCCESS)
{
+            status = CELIX_FRAMEWORK_EXCEPTION;
+        } else if (celixThreadMutex_lock(&framework->bundleLock) != CELIX_SUCCESS)
{
+            celixThreadMutex_unlock(&framework->bundleListenerLock);
+            status = CELIX_FRAMEWORK_EXCEPTION;
+        } else {
+            int i;
+            int size = arrayList_size(request->listeners);
+            for (i = 0; i < size; i++) {
+                if (request->type == BUNDLE_EVENT_TYPE) {
+                    fw_bundle_listener_pt listener = (fw_bundle_listener_pt) arrayList_get(request->listeners,
i);
+                    bundle_event_pt event = (bundle_event_pt) calloc(1, sizeof(*event));
+                    event->bundleId = request->bundleId;
+                    event->bundleSymbolicName = strdup(request->bundleSymbolicName);
+                    event->type = request->eventType;
+
+                    fw_invokeBundleListener(framework, listener->listener, event, listener->bundle);
+
+                    free(event);
+                } else if (request->type == FRAMEWORK_EVENT_TYPE) {
+                    fw_framework_listener_pt listener = (fw_framework_listener_pt) arrayList_get(request->listeners,
i);
+                    framework_event_pt event = (framework_event_pt) calloc(1, sizeof(*event));
+                    event->bundleId = request->bundleId;
+                    event->bundleSymbolicName = strdup(request->bundleSymbolicName);
+                    event->type = request->eventType;
+                    event->error = request->error;
+                    event->errorCode = request->errorCode;
+
+                    fw_invokeFrameworkListener(framework, listener->listener, event, listener->bundle);
+
+                    free(event);
+                }
+            }
 
-				if (celixThreadMutex_unlock(&framework->bundleLock)) {
-					status = CELIX_FRAMEWORK_EXCEPTION;
-				}
+            if (celixThreadMutex_unlock(&framework->bundleLock)) {
+                status = CELIX_FRAMEWORK_EXCEPTION;
+            }
 
-				if (celixThreadMutex_unlock(&framework->bundleListenerLock)) {
-					status = CELIX_FRAMEWORK_EXCEPTION;
-				}
-			}
-		}
-	}
+            if (celixThreadMutex_unlock(&framework->bundleListenerLock)) {
+                status = CELIX_FRAMEWORK_EXCEPTION;
+            }
+
+            free(request->bundleSymbolicName);
+            free(request);
+        }
+
+    }
 
 	celixThread_exit(NULL);
 

http://git-wip-us.apache.org/repos/asf/celix/blob/736af0e4/framework/public/include/bundle_event.h
----------------------------------------------------------------------
diff --git a/framework/public/include/bundle_event.h b/framework/public/include/bundle_event.h
index bdd1747..e021257 100644
--- a/framework/public/include/bundle_event.h
+++ b/framework/public/include/bundle_event.h
@@ -48,7 +48,8 @@ typedef struct bundle_event *bundle_event_pt;
 #include "bundle.h"
 
 struct bundle_event {
-	bundle_pt bundle;
+    long bundleId;
+    char* bundleSymbolicName;
 	bundle_event_type_e type;
 };
 

http://git-wip-us.apache.org/repos/asf/celix/blob/736af0e4/framework/public/include/framework_event.h
----------------------------------------------------------------------
diff --git a/framework/public/include/framework_event.h b/framework/public/include/framework_event.h
index a316a58..e36cb55 100644
--- a/framework/public/include/framework_event.h
+++ b/framework/public/include/framework_event.h
@@ -48,7 +48,8 @@ typedef struct framework_event *framework_event_pt;
 #include "bundle.h"
 
 struct framework_event {
-	bundle_pt bundle;
+	long bundleId;
+	char* bundleSymbolicName;
 	framework_event_type_e type;
 	celix_status_t errorCode;
 	char *error;

http://git-wip-us.apache.org/repos/asf/celix/blob/736af0e4/log_service/private/src/log.c
----------------------------------------------------------------------
diff --git a/log_service/private/src/log.c b/log_service/private/src/log.c
index a2d72b3..a6c3887 100644
--- a/log_service/private/src/log.c
+++ b/log_service/private/src/log.c
@@ -212,7 +212,7 @@ celix_status_t log_bundleChanged(void *listener, bundle_event_pt event)
{
 	}
 
 	if (message != NULL) {
-		status = logEntry_create(event->bundle, NULL, OSGI_LOGSERVICE_INFO, message, 0, &entry);
+		status = logEntry_create(event->bundleId, event->bundleSymbolicName, NULL, OSGI_LOGSERVICE_INFO,
message, 0, &entry);
 		if (status == CELIX_SUCCESS) {
 			status = log_addEntry(logger, entry);
 		}
@@ -222,11 +222,11 @@ celix_status_t log_bundleChanged(void *listener, bundle_event_pt event)
{
 }
 
 celix_status_t log_frameworkEvent(void *listener, framework_event_pt event) {
-	celix_status_t status = CELIX_SUCCESS;
+	celix_status_t status;
 	log_pt logger = ((framework_listener_pt) listener)->handle;
 	log_entry_pt entry = NULL;
 
-	status = logEntry_create(event->bundle, NULL, (event->type == OSGI_FRAMEWORK_EVENT_ERROR)
? OSGI_LOGSERVICE_ERROR : OSGI_LOGSERVICE_INFO, event->error, event->errorCode, &entry);
+	status = logEntry_create(event->bundleId, event->bundleSymbolicName, NULL, (event->type
== OSGI_FRAMEWORK_EVENT_ERROR) ? OSGI_LOGSERVICE_ERROR : OSGI_LOGSERVICE_INFO, event->error,
event->errorCode, &entry);
 	if (status == CELIX_SUCCESS) {
 		status = log_addEntry(logger, entry);
 	}
@@ -235,7 +235,7 @@ celix_status_t log_frameworkEvent(void *listener, framework_event_pt event)
{
 }
 
 celix_status_t log_addLogListener(log_pt logger, log_listener_pt listener) {
-	celix_status_t status = CELIX_SUCCESS;
+	celix_status_t status;
 
 	status = celixThreadMutex_lock(&logger->listenerLock);
 
@@ -251,12 +251,13 @@ celix_status_t log_addLogListener(log_pt logger, log_listener_pt listener)
{
 
 celix_status_t log_removeLogListener(log_pt logger, log_listener_pt listener) {
 	celix_status_t status = CELIX_SUCCESS;
-	bool last = false;
 
     status = CELIX_DO_IF(status, celixThreadMutex_lock(&logger->deliverLock));
     status = CELIX_DO_IF(status, celixThreadMutex_lock(&logger->listenerLock));
 
 	if (status == CELIX_SUCCESS) {
+	    bool last = false;
+
 		arrayList_removeElement(logger->listeners, listener);
 		if (arrayList_size(logger->listeners) == 0) {
 			status = log_stopListenerThread(logger);
@@ -279,7 +280,7 @@ celix_status_t log_removeLogListener(log_pt logger, log_listener_pt listener)
{
 }
 
 celix_status_t log_removeAllLogListener(log_pt logger) {
-	celix_status_t status = CELIX_SUCCESS;
+	celix_status_t status;
 
 	status = celixThreadMutex_lock(&logger->listenerLock);
 
@@ -293,7 +294,7 @@ celix_status_t log_removeAllLogListener(log_pt logger) {
 }
 
 static celix_status_t log_startListenerThread(log_pt logger) {
-	celix_status_t status = CELIX_SUCCESS;
+	celix_status_t status;
 
 	logger->running = true;
     logger->running = true;
@@ -303,7 +304,7 @@ static celix_status_t log_startListenerThread(log_pt logger) {
 }
 
 static celix_status_t log_stopListenerThread(log_pt logger) {
-	celix_status_t status = CELIX_SUCCESS;
+	celix_status_t status;
 
 	logger->running = false;
 

http://git-wip-us.apache.org/repos/asf/celix/blob/736af0e4/log_service/private/src/log_entry.c
----------------------------------------------------------------------
diff --git a/log_service/private/src/log_entry.c b/log_service/private/src/log_entry.c
index fe68bd7..8870c3b 100644
--- a/log_service/private/src/log_entry.c
+++ b/log_service/private/src/log_entry.c
@@ -32,7 +32,7 @@
 #include "log_service.h"
 #include "log_entry.h"
 
-celix_status_t logEntry_create(bundle_pt bundle, service_reference_pt reference,
+celix_status_t logEntry_create(long bundleId, char* bundleSymbolicName , service_reference_pt
reference,
         log_level_t level, char *message, int errorCode,
         log_entry_pt *entry) {
     celix_status_t status = CELIX_SUCCESS;
@@ -46,24 +46,8 @@ celix_status_t logEntry_create(bundle_pt bundle, service_reference_pt reference,
         (*entry)->errorCode = errorCode;
         (*entry)->time = time(NULL);
 
-        (*entry)->bundleSymbolicName = NULL;
-        (*entry)->bundleId = 0;
-    }
-
-    if (status == CELIX_SUCCESS) {
-        status = bundle_getBundleId(bundle, &(*entry)->bundleId);
-    }
-
-    if (status == CELIX_SUCCESS) {
-    	module_pt module = NULL;
-        status = bundle_getCurrentModule(bundle, &module);
-		if (status == CELIX_SUCCESS) {
-			char *symbolicName = NULL;
-			status = module_getSymbolicName(module, &symbolicName);
-			if (status == CELIX_SUCCESS) {
-				(*entry)->bundleSymbolicName = strdup(symbolicName);
-			}
-		}
+        (*entry)->bundleSymbolicName = strdup(bundleSymbolicName);
+        (*entry)->bundleId = bundleId;
     }
 
     return status;

http://git-wip-us.apache.org/repos/asf/celix/blob/736af0e4/log_service/private/src/log_factory.c
----------------------------------------------------------------------
diff --git a/log_service/private/src/log_factory.c b/log_service/private/src/log_factory.c
index d188044..c4565ba 100644
--- a/log_service/private/src/log_factory.c
+++ b/log_service/private/src/log_factory.c
@@ -81,7 +81,7 @@ celix_status_t logFactory_getService(void *factory, bundle_pt bundle, service_re
     log_service = calloc(1, sizeof(*log_service));
     log_service->logger = log_service_data;
     log_service->log = logService_log;
-    log_service->logSr = logService_logSr;
+  //  log_service->logSr = logService_logSr;
 
     (*service) = log_service;
 

http://git-wip-us.apache.org/repos/asf/celix/blob/736af0e4/log_service/private/src/log_service_impl.c
----------------------------------------------------------------------
diff --git a/log_service/private/src/log_service_impl.c b/log_service/private/src/log_service_impl.c
index 7d8484e..ad6313b 100644
--- a/log_service/private/src/log_service_impl.c
+++ b/log_service/private/src/log_service_impl.c
@@ -61,12 +61,33 @@ celix_status_t logService_log(log_service_data_pt logger, log_level_t
level, cha
 }
 
 celix_status_t logService_logSr(log_service_data_pt logger, service_reference_pt reference,
log_level_t level, char * message) {
+    celix_status_t status;
     log_entry_pt entry = NULL;
     bundle_pt bundle = logger->bundle;
+    bundle_archive_pt archive = NULL;
+    module_pt module = NULL;
+    char *symbolicName = NULL;
+    long bundleId = -1;
+
     if (reference != NULL) {
     	serviceReference_getBundle(reference, &bundle);
     }
-    logEntry_create(bundle, reference, level, message, 0, &entry);
+
+    status = bundle_getArchive(bundle, &archive);
+
+    if (status == CELIX_SUCCESS) {
+        status = bundleArchive_getId(archive, &bundleId);
+    }
+
+    if (status == CELIX_SUCCESS) {
+        status = bundle_getCurrentModule(bundle, &module);
+
+        if (status == CELIX_SUCCESS) {
+            status = module_getSymbolicName(module, &symbolicName);
+        }
+    }
+
+    logEntry_create(bundleId, symbolicName, reference, level, message, 0, &entry);
     log_addEntry(logger->log, entry);
 
     return CELIX_SUCCESS;

http://git-wip-us.apache.org/repos/asf/celix/blob/736af0e4/log_service/public/include/log_entry.h
----------------------------------------------------------------------
diff --git a/log_service/public/include/log_entry.h b/log_service/public/include/log_entry.h
index ca98609..b5b9c7e 100644
--- a/log_service/public/include/log_entry.h
+++ b/log_service/public/include/log_entry.h
@@ -35,13 +35,13 @@ struct log_entry {
     char *message;
     time_t time;
 
-    char *bundleSymbolicName;
     long bundleId;
+    char* bundleSymbolicName;
 };
 
 typedef struct log_entry * log_entry_pt;
 
-celix_status_t logEntry_create(bundle_pt bundle, service_reference_pt reference,
+celix_status_t logEntry_create(long bundleId, char* bundleSymbolicName , service_reference_pt
reference,
         log_level_t level, char *message, int errorCode,
         log_entry_pt *entry);
 celix_status_t logEntry_destroy(log_entry_pt *entry);

http://git-wip-us.apache.org/repos/asf/celix/blob/736af0e4/log_service/public/src/log_helper.c
----------------------------------------------------------------------
diff --git a/log_service/public/src/log_helper.c b/log_service/public/src/log_helper.c
index 0b17a36..69ea3eb 100644
--- a/log_service/public/src/log_helper.c
+++ b/log_service/public/src/log_helper.c
@@ -84,7 +84,7 @@ celix_status_t logHelper_create(bundle_context_pt context, log_helper_pt*
loghel
 
 celix_status_t logHelper_start(log_helper_pt loghelper)
 {
-	celix_status_t status = CELIX_SUCCESS;
+	celix_status_t status;
 	service_tracker_customizer_pt logTrackerCustomizer = NULL;
 
 	status = serviceTrackerCustomizer_create(loghelper, NULL, logHelper_logServiceAdded, NULL,
logHelper_logServiceRemoved, &logTrackerCustomizer);
@@ -126,7 +126,7 @@ celix_status_t logHelper_logServiceRemoved(void *handle, service_reference_pt
re
 
 
 celix_status_t logHelper_stop(log_helper_pt loghelper) {
-	celix_status_t status = CELIX_SUCCESS;
+	celix_status_t status;
 
     status = serviceTracker_close(loghelper->logServiceTracker);
 


Mime
View raw message