]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix accurate option in the estimate command
authorEric Bollengier <eric@baculasystems.com>
Thu, 13 Sep 2012 06:49:44 +0000 (08:49 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:50:58 +0000 (14:50 +0200)
bacula/src/dird/ua_cmds.c

index 9c37032325ca16861643014c9ea446ea31a40a32..0e4fd9d8df97d78d8a3ea1e64dbd19ee9dee2be2 100644 (file)
@@ -1254,9 +1254,14 @@ static int estimate_cmd(UAContext *ua, const char *cmd)
          }
       }
       if (strcasecmp(ua->argk[i], NT_("accurate")) == 0) {
-         if (!is_yesno(ua->argv[i], &accurate)) {
-            ua->error_msg(_("Invalid value for accurate. " 
-                            "It must be yes or no.\n"));
+         if (ua->argv[i]) {
+            if (!is_yesno(ua->argv[i], &accurate)) {
+               ua->error_msg(_("Invalid value for accurate. " 
+                               "It must be yes or no.\n"));
+            }
+            continue;
+         } else {
+            ua->error_msg(_("Accurate value missing.\n"));
          }
       }
    }