]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
metaplugin: Fix regression on restore options restore.
authorRadosław Korzeniewski <radoslaw@korzeniewski.net>
Tue, 13 Jul 2021 18:26:11 +0000 (20:26 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:03:03 +0000 (09:03 +0100)
bacula/src/plugins/fd/pluginlib/metaplugin.cpp

index a96f0aa390d9b7a0d9169ea8734f6535ce9278c0..53ead4b0bcb5db9e4d70818b812397392a660249 100644 (file)
@@ -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))