{
callback_func_t *cf = le->value;
plugin_write_cb callback;
- plugin_ctx_t old_ctx = plugin_set_ctx (cf->cf_ctx);
+
+ /* do not switch plugin context; rather keep the context (interval)
+ * information of the calling read plugin */
DEBUG ("plugin: plugin_write: Writing values via %s.", le->key);
callback = cf->cf_callback;
else
success++;
- plugin_set_ctx (old_ctx);
-
le = le->next;
}
{
callback_func_t *cf;
plugin_write_cb callback;
- plugin_ctx_t old_ctx;
le = llist_head (list_write);
while (le != NULL)
cf = le->value;
- old_ctx = plugin_set_ctx (cf->cf_ctx);
+ /* do not switch plugin context; rather keep the context (interval)
+ * information of the calling read plugin */
DEBUG ("plugin: plugin_write: Writing values via %s.", le->key);
callback = cf->cf_callback;
status = (*callback) (ds, vl, &cf->cf_udata);
-
- plugin_set_ctx (old_ctx);
}
return (status);
{
callback_func_t *cf;
plugin_notification_cb callback;
- plugin_ctx_t old_ctx;
int status;
+ /* do not switch plugin context; rather keep the context
+ * (interval) information of the calling plugin */
+
cf = le->value;
- old_ctx = plugin_set_ctx (cf->cf_ctx);
callback = cf->cf_callback;
status = (*callback) (notif, &cf->cf_udata);
- plugin_set_ctx (old_ctx);
if (status != 0)
{
WARNING ("plugin_dispatch_notification: Notification "
{
callback_func_t *cf;
plugin_log_cb callback;
- plugin_ctx_t old_ctx;
cf = le->value;
- old_ctx = plugin_set_ctx (cf->cf_ctx);
callback = cf->cf_callback;
+ /* do not switch plugin context; rather keep the context
+ * (interval) information of the calling plugin */
+
(*callback) (level, msg, &cf->cf_udata);
- plugin_set_ctx (old_ctx);
le = le->next;
}
} /* void plugin_log */