diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-12-05 16:51:25 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-12-14 11:00:49 +0100 |
commit | fb487caec38c0da7a43bab850af6aa79b07befde (patch) | |
tree | da3c46e3e8dcd4627fee54f784b391b284d373b5 /signal-composer-binding/source.cpp | |
parent | 2c3a3ca76a57efa1cd825d140fb26fdec3482ee8 (diff) |
Hold all contexts (plugin & source) in signalCtx_
Keeping persistence between call data are kept in that member
also subscription Action now use getSignals_ context and no more
the signal one, this is more accurate and simples
Change-Id: Idd7c56ba30f1daa9eaf9b99a7261d58189ef0bb2
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'signal-composer-binding/source.cpp')
-rw-r--r-- | signal-composer-binding/source.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/signal-composer-binding/source.cpp b/signal-composer-binding/source.cpp index 6ad9511..3180513 100644 --- a/signal-composer-binding/source.cpp +++ b/signal-composer-binding/source.cpp @@ -113,11 +113,13 @@ void SourceAPI::makeSubscription() break; } source.uid = sig.first.c_str(); - source.context = (void*)sig.second->get_context(); + source.context = getSignals_->type == CTL_TYPE_CB ? + getSignals_->exec.cb.plugin->context: + nullptr; ActionExecOne(&source, getSignals_, signalJ); // Considerate signal subscribed no matter what sig.second->subscribed_ = true; - delete((struct signalCBT*)source.context); + json_object_put(signalJ); } source.uid = ""; ActionExecOne(&source, getSignals_, nullptr); |