} else {
store = get_storage_resource(ua, false/*no default*/);
if (store) {
- if (find_arg(ua, NT_("slots")) > 0) {
- status_slots(ua, store);
- } else {
- do_storage_status(ua, store, NULL);
- }
+ if (find_arg(ua, NT_("slots")) > 0) {
+ status_slots(ua, store);
+ } else {
+ do_storage_status(ua, store, NULL);
+ }
}
return 1;
}
MEDIA_DBR mr;
int orig_jobtype;
- orig_jobtype = jcr->JobType;
+ orig_jobtype = jcr->get_JobType();
memset(&mr, 0, sizeof(mr));
if (sp->job->JobType == JT_BACKUP) {
jcr->db = NULL;
db_close_database(jcr, jcr->db);
}
jcr->db = ua->db; /* restore ua db to jcr */
- jcr->JobType = orig_jobtype;
+ jcr->set_JobType(orig_jobtype);
}
/*
i = find_arg_with_value(ua, NT_("days"));
if (i >= 0) {
days = atoi(ua->argv[i]);
- if ((days < 0) || (days > 500) && !ua->api) {
+ if (((days < 0) || (days > 500)) && !ua->api) {
ua->send_msg(_("Ignoring invalid value for days. Max is 500.\n"));
days = 1;
}
/* this is a console or other control job. We only show console
* jobs in the status output.
*/
- if (jcr->JobType == JT_CONSOLE && !ua->api) {
+ if (jcr->get_JobType() == JT_CONSOLE && !ua->api) {
bstrftime_nc(dt, sizeof(dt), jcr->start_time);
ua->send_msg(_("Console connected at %s\n"), dt);
}
msg = _("Dir inserting Attributes");
break;
}
- switch (jcr->JobType) {
+ switch (jcr->get_JobType()) {
case JT_ADMIN:
case JT_RESTORE:
bstrncpy(level, " ", sizeof(level));
break;
default:
- bstrncpy(level, level_to_str(jcr->JobLevel), sizeof(level));
+ bstrncpy(level, level_to_str(jcr->get_JobLevel()), sizeof(level));
level[7] = 0;
break;
}