From ef730b4fd47dde3636bdde434f10f9f754c7d3df Mon Sep 17 00:00:00 2001 From: Sebastian Sura Date: Thu, 26 Oct 2023 13:18:59 +0200 Subject: [PATCH] python-plugins: set context when handling events --- core/src/plugins/filed/python/python-fd.cc | 2 ++ core/src/plugins/stored/python/python-sd.cc | 2 ++ 2 files changed, 4 insertions(+) diff --git a/core/src/plugins/filed/python/python-fd.cc b/core/src/plugins/filed/python/python-fd.cc index 378bbfc7a12..a9de3f58676 100644 --- a/core/src/plugins/filed/python/python-fd.cc +++ b/core/src/plugins/filed/python/python-fd.cc @@ -296,6 +296,8 @@ static bRC handlePluginEvent(PluginContext* plugin_ctx, if (!plugin_priv_ctx) { goto bail_out; } + Bareosfd_set_plugin_context(plugin_ctx); + /* First handle some events internally before calling python if it * want to do some special handling on the event triggered. */ switch (event->eventType) { diff --git a/core/src/plugins/stored/python/python-sd.cc b/core/src/plugins/stored/python/python-sd.cc index 3c99aaa2765..7a5f4a3cef6 100644 --- a/core/src/plugins/stored/python/python-sd.cc +++ b/core/src/plugins/stored/python/python-sd.cc @@ -301,6 +301,8 @@ static bRC handlePluginEvent(PluginContext* plugin_ctx, if (!plugin_priv_ctx) { goto bail_out; } + Bareossd_set_plugin_context(plugin_ctx); + /* First handle some events internally before calling python if it * want to do some special handling on the event triggered. */ switch (event->eventType) {