From: Radosław Korzeniewski Date: Tue, 13 Jul 2021 18:26:11 +0000 (+0200) Subject: metaplugin: Fix regression on restore options restore. X-Git-Tag: Release-11.3.2~434 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39c4ae3a6c8cae47fc3074f7019a573ff43e5c61;p=thirdparty%2Fbacula.git metaplugin: Fix regression on restore options restore. --- diff --git a/bacula/src/plugins/fd/pluginlib/metaplugin.cpp b/bacula/src/plugins/fd/pluginlib/metaplugin.cpp index a96f0aa39..53ead4b0b 100644 --- a/bacula/src/plugins/fd/pluginlib/metaplugin.cpp +++ b/bacula/src/plugins/fd/pluginlib/metaplugin.cpp @@ -381,13 +381,12 @@ bRC METAPLUGIN::handle_plugin_restoreobj(bpContext *ctx, restore_object_pkt *rop return bRC_OK; /* end of rop list */ } - /* we have a single RO for every backend */ - backend.switch_command(rop->plugin_name); + DMSG2(ctx, DDEBUG, "handle_plugin_restoreobj: %s %d\n", rop->object_name, rop->object_type); // if (strcmp(rop->object_name, INI_RESTORE_OBJECT_NAME) == 0) { - if (strcmp(rop->object_name, INI_RESTORE_OBJECT_NAME) == 0 && rop->object_type == FT_PLUGIN_CONFIG) { + if (strcmp(rop->object_name, INI_RESTORE_OBJECT_NAME) == 0 && (rop->object_type == FT_PLUGIN_CONFIG || rop->object_type == FT_PLUGIN_CONFIG_FILLED)) { - DMSG2(ctx, DINFO, "INIcmd: %s %d\n", rop->plugin_name, rop->object_type); + DMSG(ctx, DINFO, "INIcmd: %s\n", rop->plugin_name); ini.clear_items(); if (!ini.dump_string(rop->object, rop->object_len))