]> git.sur5r.net Git - bacula/bacula/commitdiff
Add back ua_label barcode fix from Rufolf Cejka.
authorKern Sibbald <kern@sibbald.com>
Tue, 25 Apr 2006 15:39:51 +0000 (15:39 +0000)
committerKern Sibbald <kern@sibbald.com>
Tue, 25 Apr 2006 15:39:51 +0000 (15:39 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2967 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/kes-1.39
bacula/src/dird/ua_label.c

index ad5891848eb606f83761e59185254dbe2166cab7..2b7a766d27cf6346301381e457cbbfeed1d2d23d 100644 (file)
@@ -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 ...
index 1c7ad3797b2c4b2cc1c095bfa914fae7362caaf5..d2bee65878f7bd9a0caba8728b2addfd4289b917 100644 (file)
@@ -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;
    }