From 97cfff753ccb7e5739ebe53e43a5af29dc0f6577 Mon Sep 17 00:00:00 2001 From: Manuel Bachmann Date: Wed, 23 Dec 2015 18:54:24 +0100 Subject: Add plugin handle into request, pass it to free callback We need the global handle in requests, and in the free function. Signed-off-by: Manuel Bachmann --- include/local-def.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/local-def.h b/include/local-def.h index 9c584417..843805f8 100644 --- a/include/local-def.h +++ b/include/local-def.h @@ -97,7 +97,7 @@ extern char *ERROR_LABEL[]; typedef json_object* (*AFB_apiCB)(); -typedef void (*AFB_freeCtxCB)(void*, char*); +typedef void (*AFB_freeCtxCB)(void*, void*, char*); // Error code are requested through function to manage json usage count typedef struct { @@ -237,7 +237,7 @@ typedef struct { typedef struct { const char *uuid; const char *url; - char *plugin; + char *prefix; // plugin convivial name char *api; AFB_PostRequest *post; json_object *jresp; @@ -247,6 +247,7 @@ typedef struct { sigjmp_buf checkPluginCall; // context save for timeout set/longjmp AFB_config *config; // plugin may need access to config struct MHD_Connection *connection; + AFB_plugin *plugin; // provide callback and easy access to plugin AFB_plugin **plugins; } AFB_request; -- cgit 1.2.3-korg