Skip to content

Commit

Permalink
fdplugins: Fix some plugin problems.
Browse files Browse the repository at this point in the history
We should return a boolean from trigger_plugin_event()
and not a bRC value. When rc is non null always set
a proper bRC value that way.
  • Loading branch information
Marco van Wieringen committed Aug 29, 2016
1 parent 1a8ba8f commit c33d2fd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/filed/fd_plugins.c
Expand Up @@ -235,11 +235,17 @@ static inline bool trigger_plugin_event(JCR *jcr, bEventType eventType,

if (!is_event_enabled(ctx, eventType)) {
Dmsg1(dbglvl, "Event %d disabled for this plugin.\n", eventType);
if (rc) {
*rc = bRC_OK;
}
goto bail_out;
}

if (is_plugin_disabled(ctx)) {
return bRC_OK;
if (rc) {
*rc = bRC_OK;
}
goto bail_out;
}

if (eventType == bEventEndRestoreJob) {
Expand Down

0 comments on commit c33d2fd

Please sign in to comment.