You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pn...@apache.org on 2018/05/14 19:17:58 UTC

[07/12] celix git commit: CELIX-446: Fixes a forgotten (gcc only) example function

CELIX-446: Fixes a forgotten (gcc only) example function


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

Branch: refs/heads/feature/CELIX-426-cxx-api
Commit: d7546831aa063a69aa9e592cd7a4634e2c6cd4bc
Parents: 48aada3
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Fri May 11 15:23:37 2018 +0200
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Fri May 11 15:23:37 2018 +0200

----------------------------------------------------------------------
 .../services_example_c/src/dynamic_consumer_example.c         | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/d7546831/examples/celix-examples/services_example_c/src/dynamic_consumer_example.c
----------------------------------------------------------------------
diff --git a/examples/celix-examples/services_example_c/src/dynamic_consumer_example.c b/examples/celix-examples/services_example_c/src/dynamic_consumer_example.c
index 7a7f177..b935271 100644
--- a/examples/celix-examples/services_example_c/src/dynamic_consumer_example.c
+++ b/examples/celix-examples/services_example_c/src/dynamic_consumer_example.c
@@ -75,11 +75,10 @@ static void gccExample(activator_data_t *data) {
         result = calc->calc(calc->handle, 1);
     }
 
-    celix_service_use_options_t opts;
-    memset(&opts, 0, sizeof(opts));
+    celix_service_use_options_t opts = CELIX_EMPTY_SERVICE_USE_OPTIONS;
 
-    opts.serviceName = EXAMPLE_CALC_NAME;
-    opts.callbackHandle = NULL; //can be null for trampolines
+    opts.filter.serviceName = EXAMPLE_CALC_NAME;
+    opts.callbackHandle = NULL; //can be null
     opts.useWithProperties = use;
     bool called = celix_bundleContext_useServiceWithOptions(data->ctx, &opts);