]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua_select.c
ebl Try to fix bug on RunScript {} resource parsing
[bacula/bacula] / bacula / src / dird / ua_select.c
index 169fbc45e6e56fdcff8faaef68c1da21bce3f706..6fbfb84d033025fcb8e4c3d90ea2ea36ed4cad09 100644 (file)
@@ -34,6 +34,7 @@ extern struct s_jl joblevels[];
 int confirm_retention(UAContext *ua, utime_t *ret, const char *msg)
 {
    char ed1[100];
+   int val;
 
    for ( ;; ) {
        bsendmsg(ua, _("The current %s retention period is: %s\n"),
@@ -51,11 +52,8 @@ int confirm_retention(UAContext *ua, utime_t *ret, const char *msg)
           }
           continue;
        }
-       if (strcasecmp(ua->cmd, _("yes")) == 0) {
-          return 1;
-       }
-       if (strcasecmp(ua->cmd, _("no")) == 0) {
-          return 0;
+       if (is_yesno(ua->cmd, &val)) {
+          return val;           /* is 1 for yes, 0 for no */
        }
     }
     return 1;