summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ctl-lib/ctl-action.c1
-rw-r--r--ctl-lib/ctl-plugin.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/ctl-lib/ctl-action.c b/ctl-lib/ctl-action.c
index 4c72105..c1b7123 100644
--- a/ctl-lib/ctl-action.c
+++ b/ctl-lib/ctl-action.c
@@ -106,6 +106,7 @@ int ActionExecOne(CtlSourceT *source, CtlActionT* action, json_object *queryJ) {
#endif
case CTL_TYPE_CB:
+ source->plugin = action->exec.cb.plugin;
err = (*action->exec.cb.callback) (source, action->argsJ, queryJ);
if (err) {
AFB_ApiError(action->api, "ActionExecOne(Callback) uid%s plugin=%s function=%s args=%s", source->uid, action->exec.cb.plugin->uid, action->exec.cb.funcname, json_object_get_string(action->argsJ));
diff --git a/ctl-lib/ctl-plugin.h b/ctl-lib/ctl-plugin.h
index d931906..d7ede8e 100644
--- a/ctl-lib/ctl-plugin.h
+++ b/ctl-lib/ctl-plugin.h
@@ -87,6 +87,7 @@ typedef struct {
AFB_ApiT api;
AFB_ReqT request;
void *context;
+ CtlPluginT *plugin;
CtlActionStatusT status;
} CtlSourceT;