X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=plugins%2Fsamples%2FClientCtx.c;h=3fa43adf5462f152de96351e552b0b16fe378074;hb=11d36a9f7e16aa9992835f8ce06f0e1e5297b131;hp=cda6abbb2bca5b2c4a5e6f9f9f1e34921abb1e62;hpb=b8d4c81cc8175ce49c77d41e572a9f1a2e367cdc;p=src%2Fapp-framework-binder.git diff --git a/plugins/samples/ClientCtx.c b/plugins/samples/ClientCtx.c index cda6abbb..3fa43adf 100644 --- a/plugins/samples/ClientCtx.c +++ b/plugins/samples/ClientCtx.c @@ -75,7 +75,7 @@ static void myCreate (struct afb_req request) ctx->count = 0; ctx->abcd = "SomeThingUseful"; - *request.context = ctx; + request.context = ctx; afb_req_success_f(request, NULL, "SUCCESS: create client context for plugin [%s]", handle->anythingYouWant); } @@ -86,7 +86,7 @@ static void myCreate (struct afb_req request) static void myAction (struct afb_req request) { MyPluginHandleT *handle = (MyPluginHandleT*) &global_handle; - MyClientContextT *ctx = (MyClientContextT*) *request.context; + MyClientContextT *ctx = (MyClientContextT*) request.context; // store something in our plugin private client context ctx->count++; @@ -100,7 +100,7 @@ static void myAction (struct afb_req request) static void myClose (struct afb_req request) { MyPluginHandleT *handle = (MyPluginHandleT*) &global_handle; - MyClientContextT *ctx = (MyClientContextT*) *request.context; + MyClientContextT *ctx = (MyClientContextT*) request.context; // store something in our plugin private client context ctx->count++; @@ -132,8 +132,9 @@ static const struct AFB_plugin plugin_desc = { .freeCtxCB = (void*)freeCtxCB }; -const struct AFB_plugin *pluginRegister () +const struct AFB_plugin *pluginRegister (const struct AFB_interface *itf) { + global_handle.anythingYouWant = "anythingYouWant"; return &plugin_desc; }