Skip to content

Commit

Permalink
python-plugins: set context when handling events
Browse files Browse the repository at this point in the history
  • Loading branch information
sebsura authored and BareosBot committed Dec 22, 2023
1 parent c3eb763 commit ef730b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/src/plugins/filed/python/python-fd.cc
Expand Up @@ -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) {
Expand Down
2 changes: 2 additions & 0 deletions core/src/plugins/stored/python/python-sd.cc
Expand Up @@ -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) {
Expand Down

0 comments on commit ef730b4

Please sign in to comment.