Skip to content

Commit

Permalink
ua_output: give better error message
Browse files Browse the repository at this point in the history
when get_jobid_from_cmdline() does not return jobid
  • Loading branch information
pstorz committed Jun 2, 2017
1 parent c756494 commit cbbf7b3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/dird/ua_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ static bool do_list_cmd(UAContext *ua, const char *cmd, e_list_type llist)
if (jobid > 0) {
ua->db->list_base_files_for_job(ua->jcr, jobid, ua->send);
} else {
ua->error_msg(_("missing parameter: jobid\n"));
ua->error_msg(_("jobid not found in db, access to job or client denied by ACL, or client not found in db\n"));
}
} else if (bstrcasecmp(ua->argk[1], NT_("files"))) {
/*
Expand All @@ -734,7 +734,7 @@ static bool do_list_cmd(UAContext *ua, const char *cmd, e_list_type llist)
if (jobid > 0) {
ua->db->list_files_for_job(ua->jcr, jobid, ua->send);
} else {
ua->error_msg(_("missing parameter: jobid\n"));
ua->error_msg(_("jobid not found in db, access to job or client denied by ACL, or client not found in db\n"));
}
} else if (bstrcasecmp(ua->argk[1], NT_("fileset"))) {
int filesetid = 0;
Expand All @@ -761,7 +761,7 @@ static bool do_list_cmd(UAContext *ua, const char *cmd, e_list_type llist)

ua->db->list_filesets(ua->jcr, &jr, query_range.c_str(), ua->send, llist);
} else {
ua->error_msg(_("missing parameter: jobid or filesetid\n"));
ua->error_msg(_("jobid not found in db, access to job or client denied by ACL, or client not found in db or missing filesetid\n"));
}
} else if (bstrcasecmp(ua->argk[1], NT_("filesets"))) {
/*
Expand All @@ -783,7 +783,7 @@ static bool do_list_cmd(UAContext *ua, const char *cmd, e_list_type llist)
if (jobid >= 0) {
ua->db->list_jobmedia_records(ua->jcr, jobid, ua->send, llist);
} else {
ua->error_msg(_("missing parameter: jobid\n"));
ua->error_msg(_("jobid not found in db, access to job or client denied by ACL, or client not found in db\n"));
}
} else if (bstrcasecmp(ua->argk[1], NT_("joblog"))) {
/*
Expand All @@ -793,7 +793,7 @@ static bool do_list_cmd(UAContext *ua, const char *cmd, e_list_type llist)
if (jobid >= 0) {
ua->db->list_joblog_records(ua->jcr, jobid, ua->send, llist);
} else {
ua->error_msg(_("missing parameter: jobid\n"));
ua->error_msg(_("jobid not found in db, access to job or client denied by ACL, or client not found in db\n"));
}
} else if (bstrcasecmp(ua->argk[1], NT_("log"))) {
bool reverse;
Expand Down

0 comments on commit cbbf7b3

Please sign in to comment.