From f4ebd10b57a99e461fd4faeeeaf4c8a0fed85586 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 25 Apr 2006 15:39:51 +0000 Subject: [PATCH] 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 --- bacula/kes-1.39 | 1 + bacula/src/dird/ua_label.c | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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; } -- 2.39.5