static void do_client_status(UAContext *ua, CLIENT *client, char *cmd);
static void do_director_status(UAContext *ua);
static void do_all_status(UAContext *ua);
+void status_slots(UAContext *ua, STORE *store);
static char OKqstatus[] = "1000 OK .status\n";
static char DotStatusJob[] = "JobId=%s JobStatus=%c JobErrors=%d\n";
} else {
store = get_storage_resource(ua, false/*no default*/);
if (store) {
- 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;
}
bool close_db = false;
JCR *jcr = ua->jcr;
MEDIA_DBR mr;
+ int orig_jobtype;
+ orig_jobtype = jcr->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;
}
/*