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"),
}
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;
{
for (int i=1; i<ua->argc; i++) {
for(int j=0; list[j]; j++) {
- if (strcasecmp(_(list[j]), ua->argk[i]) == 0) {
+ if (strcasecmp(list[j], ua->argk[i]) == 0) {
return j;
}
}
int i;
for (i=1; i<ua->argc; i++) {
- if (strcasecmp(ua->argk[i], _("catalog")) == 0 && ua->argv[i]) {
+ if (strcasecmp(ua->argk[i], NT_("catalog")) == 0 && ua->argv[i]) {
if (acl_access_ok(ua, Catalog_ACL, ua->argv[i])) {
catalog = (CAT *)GetResWithName(R_CATALOG, ua->argv[i]);
break;
bsendmsg(ua, _("Could not find Client %s: ERR=%s"), cr->Name, db_strerror(ua->db));
}
for (i=1; i<ua->argc; i++) {
- if ((strcasecmp(ua->argk[i], _("client")) == 0 ||
- strcasecmp(ua->argk[i], _("fd")) == 0) && ua->argv[i]) {
+ if ((strcasecmp(ua->argk[i], NT_("client")) == 0 ||
+ strcasecmp(ua->argk[i], NT_("fd")) == 0) && ua->argv[i]) {
if (!acl_access_ok(ua, Client_ACL, ua->argv[i])) {
break;
}
bsendmsg(ua, _("JobId %s is not running.\n"), edit_int64(jobid, ed1));
return NULL;
}
- store = jcr->store;
+ store = jcr->wstore;
free_jcr(jcr);
break;
bsendmsg(ua, _("Job \"%s\" is not running.\n"), ua->argv[i]);
return NULL;
}
- store = jcr->store;
+ store = jcr->wstore;
free_jcr(jcr);
break;
} else if (strcasecmp(ua->argk[i], NT_("ujobid")) == 0) {
bsendmsg(ua, _("Job \"%s\" is not running.\n"), ua->argv[i]);
return NULL;
}
- store = jcr->store;
+ store = jcr->wstore;
free_jcr(jcr);
break;
}