aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/samples/ClientCtx.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-04-05 13:18:21 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2016-04-05 13:18:21 +0200
commitefe18167d6ce59b263c179a6e2d01aa875c05cf8 (patch)
treee3e5f9c9f6d0c9d131503a6b54f608f9fbfcf2a1 /plugins/samples/ClientCtx.c
parent677717c5c86f107b2d196d70796a9be7db3532df (diff)
fix context values
Change-Id: I8a904fe7e0e895854729ae852b63c090f6c5bb5f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'plugins/samples/ClientCtx.c')
-rw-r--r--plugins/samples/ClientCtx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/samples/ClientCtx.c b/plugins/samples/ClientCtx.c
index 3fa43adf..0ea88087 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++;