From: Kern Sibbald Date: Mon, 29 Sep 2008 19:09:45 +0000 (+0000) Subject: Correct a bug in passing the context to the endRestoreFile() plugin command. X-Git-Tag: Release-7.0.0~4068 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bae24fa6d84b53c4511cb5a08caf6c6b53a429b3;p=bacula%2Fbacula Correct a bug in passing the context to the endRestoreFile() plugin command. Bastien Friedrich reported the bug git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7664 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/filed/fd_plugins.c b/bacula/src/filed/fd_plugins.c index 6ef67bcda4..f0e774d617 100644 --- a/bacula/src/filed/fd_plugins.c +++ b/bacula/src/filed/fd_plugins.c @@ -166,7 +166,7 @@ int plugin_save(JCR *jcr, FF_PKT *ff_pkt, bool top_level) continue; } Dmsg1(dbglvl, "Command plugin = %s\n", cmd); - /* Send the backup command */ + /* Send the backup command to the right plugin*/ if (plug_func(plugin)->handlePluginEvent(&plugin_ctx_list[i], &event, cmd) != bRC_OK) { goto bail_out; } @@ -279,7 +279,7 @@ void plugin_name_stream(JCR *jcr, char *name) * End of plugin data, notify plugin, then clear flags */ plugin = (Plugin *)jcr->plugin; - plug_func(plugin)->endRestoreFile(&plugin_ctx_list[i]); + plug_func(plugin)->endRestoreFile((bpContext *)jcr->plugin_ctx); jcr->plugin_ctx = NULL; jcr->plugin = NULL; goto bail_out; diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index 65c67b424f..6185eab979 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -18,6 +18,8 @@ remove reader/writer in FOPTS???? General: 29Sep08 +kes Correct a bug in passing the context to the endRestoreFile() plugin command. + Bastien Friedrich reported the bug. kes Create plugin instance only when FD job starts. kes Add new FD plugin event: bEventCancelCommand when a cancel command is issued to the FD.