From: Kern Sibbald Date: Tue, 25 Apr 2006 15:39:51 +0000 (+0000) Subject: Add back ua_label barcode fix from Rufolf Cejka. X-Git-Tag: Release-7.0.0~8029 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=10205c3423d376e344740d357ae53118d27119ab;p=bacula%2Fbacula Add back ua_label barcode fix from Rufolf Cejka. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2967 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/kes-1.39 b/bacula/kes-1.39 index ad5891848e..2b7a766d27 100644 --- a/bacula/kes-1.39 +++ b/bacula/kes-1.39 @@ -3,6 +3,7 @@ General: 25Apr06 +- Add back ua_label barcode fix from Rufolf Cejka. - Integrate the majority of the Mingw cross-tools submission made by Howard Thomson. Everything compiles, with zlib, openssl, and VSS turned off. Linking needs a pthreads library ... diff --git a/bacula/src/dird/ua_label.c b/bacula/src/dird/ua_label.c index 1c7ad3797b..d2bee65878 100644 --- a/bacula/src/dird/ua_label.c +++ b/bacula/src/dird/ua_label.c @@ -290,7 +290,7 @@ static int do_label(UAContext *ua, const char *cmd, int relabel) bool print_reminder = true; bool label_barcodes = false; int ok = FALSE; - int i; + int i, j; int drive; bool media_record_exists = false; static const char *barcode_keyword[] = { @@ -304,8 +304,12 @@ static int do_label(UAContext *ua, const char *cmd, int relabel) return 1; } + /* Look for one of the barcode keywords */ if (!relabel && (i=find_arg_keyword(ua, barcode_keyword)) >= 0) { - *ua->argk[i] = 0; /* zap barcode keyword */ + /* Now find the keyword in the list */ + if ((j = find_arg(ua, barcode_keyword[i]))) { + *ua->argk[j] = 0; /* zap barcode keyword */ + } label_barcodes = true; }