]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix bug #2392 again -- slot limited to pool maxvols
authorKern Sibbald <kern@sibbald.com>
Sat, 4 Aug 2018 14:49:32 +0000 (16:49 +0200)
committerKern Sibbald <kern@sibbald.com>
Tue, 7 Aug 2018 09:04:14 +0000 (11:04 +0200)
bacula/src/dird/ua_update.c

index 3c6fd790c3e4c3575c05908e3d64c9e1ba23f21f..920595208240be855fd40a3d49b681fbf56aa791 100644 (file)
@@ -309,10 +309,8 @@ static void update_volslot(UAContext *ua, char *val, MEDIA_DBR *mr)
       return;
    }
    mr->Slot = atoi(val);
-   if (pr.MaxVols > 0 && mr->Slot > (int)pr.MaxVols) {
-      ua->error_msg(_("Invalid slot, it must be between 0 and MaxVols=%d\n"),
-         pr.MaxVols);
-      return;
+   if (mr->Slot < 0) {
+      ua->error_msg(_("Invalid slot, it must be greater than zero\n"));
    }
    /*
     * Make sure to use db_update... rather than doing this directly,