From: Kern Sibbald Date: Mon, 15 Feb 2016 09:18:34 +0000 (+1000) Subject: Fix update Volume=x Slot=nn when Slot > MaxVols X-Git-Tag: Release-7.4.0a~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=51d12497eac8b8e6f7cc33bd44e6fd976069269e;p=bacula%2Fbacula Fix update Volume=x Slot=nn when Slot > MaxVols --- diff --git a/bacula/src/dird/ua_update.c b/bacula/src/dird/ua_update.c index fdfe7d74ca..9d1a1707f6 100644 --- a/bacula/src/dird/ua_update.c +++ b/bacula/src/dird/ua_update.c @@ -291,9 +291,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); + if (mr->Slot < 0) { + ua->error_msg(_("Invalid slot, it must be greater than zero\n")); return; } /*