]> 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)
committerEric Bollengier <eric@baculasystems.com>
Thu, 13 Sep 2012 06:50:51 +0000 (08:50 +0200)
bacula/src/dird/ua_cmds.c

index 603990e22b9943b9ddfbbd6cebcdee030b7cd500..d42bc7f9b1b9df07970b21ad6baf89ebf38f8242 100644 (file)
@@ -1144,9 +1144,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"));
          }
       }
    }