This is an automated email from the ASF dual-hosted git repository.

pnoltes pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/celix.git


The following commit(s) were added to refs/heads/develop by this push:
     new 24fbd86  Fixes an issues in the log writer
24fbd86 is described below

commit 24fbd867aab4b563f7e5dfcde791973311ddc229
Author: Pepijn Noltes <[email protected]>
AuthorDate: Mon Jun 3 10:29:34 2019 +0200

    Fixes an issues in the log writer
---
 .../logging/log_writer/log_writer/src/log_writer_activator.c   | 10 +++++-----
 examples/celix-examples/log_service_example/CMakeLists.txt     |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/bundles/logging/log_writer/log_writer/src/log_writer_activator.c 
b/bundles/logging/log_writer/log_writer/src/log_writer_activator.c
index 8652e47..0539bbc 100644
--- a/bundles/logging/log_writer/log_writer/src/log_writer_activator.c
+++ b/bundles/logging/log_writer/log_writer/src/log_writer_activator.c
@@ -26,25 +26,25 @@
 typedef struct celix_logwriter_activator {
     celix_log_writer_t *writer;
        long svcTracker;
-       log_listener_t *listener;
+       log_listener_t listener;
 } celix_logwriter_activator_t;
 
 static void addSvc(void *handle, void *svc) {
     celix_logwriter_activator_t *act = handle;
        log_reader_service_t *reader = svc;
-       reader->addLogListener(reader->reader, act->listener);
+       reader->addLogListener(reader->reader, &act->listener);
 }
 
 static void remSvc(void *handle, void *svc) {
     celix_logwriter_activator_t *act = handle;
        log_reader_service_t *reader = svc;
-    reader->removeLogListener(reader->reader, act->listener);
+    reader->removeLogListener(reader->reader, &act->listener);
 }
 
 static celix_status_t logWriterActivator_start(celix_logwriter_activator_t 
*act, celix_bundle_context_t *ctx) {
     act->writer = celix_logWriter_create(ctx);
-       act->listener->handle = act->writer;
-       act->listener->logged = (void*)celix_logWriter_logged;
+       act->listener.handle = act->writer;
+       act->listener.logged = (void*)celix_logWriter_logged;
        act->svcTracker = -1L;
        if (act->writer != NULL) {
                celix_service_tracking_options_t opts = 
CELIX_EMPTY_SERVICE_TRACKING_OPTIONS;
diff --git a/examples/celix-examples/log_service_example/CMakeLists.txt 
b/examples/celix-examples/log_service_example/CMakeLists.txt
index 31f6fc8..5b7f68e 100644
--- a/examples/celix-examples/log_service_example/CMakeLists.txt
+++ b/examples/celix-examples/log_service_example/CMakeLists.txt
@@ -27,5 +27,5 @@ target_link_libraries(log_service_example PRIVATE 
Celix::log_service_api Celix::
 
 add_celix_container(log_example
     GROUP log_service
-    BUNDLES log_service_example Celix::log_service Celix::shell 
Celix::shell_tui
+    BUNDLES log_service_example Celix::log_service Celix::shell 
Celix::shell_tui Celix::log_writer_stdout
 )

Reply via email to