static int backupscmd(UAContext *ua, const char *cmd);
static int levelscmd(UAContext *ua, const char *cmd);
-struct cmdstruct { const char *key; int (*func)(UAContext *ua, const char *cmd); const char *help; };
+struct cmdstruct { const char *key; int (*func)(UAContext *ua, const char *cmd); const char *help; };
static struct cmdstruct commands[] = {
{ N_(".die"), diecmd, NULL},
{ N_(".jobs"), jobscmd, NULL},
{ N_(".messages"), qmessagescmd, NULL},
{ N_(".help"), qhelp_cmd, NULL},
{ N_(".quit"), quit_cmd, NULL},
- { N_(".exit"), quit_cmd, NULL}
+ { N_(".exit"), quit_cmd, NULL}
};
#define comsize (sizeof(commands)/sizeof(struct cmdstruct))
int do_a_dot_command(UAContext *ua, const char *cmd)
{
int i;
- int len, stat;
+ int len, stat;
bool found = false;
stat = 1;
- Dmsg1(400, "Dot command: %s\n", ua->UA_sock->msg);
+ Dmsg1(1400, "Dot command: %s\n", ua->UA_sock->msg);
if (ua->argc == 0) {
return 1;
}
}
/*
- * Create segmentation fault
+ * Create segmentation fault
*/
static int diecmd(UAContext *ua, const char *cmd)
{
JCR *jcr = NULL;
int a;
-
+
bsendmsg(ua, "The Director will segment fault.\n");
a = jcr->JobId; /* ref NULL pointer */
jcr->JobId = 1000; /* another ref NULL pointer */
*/
static int defaultscmd(UAContext *ua, const char *cmd)
{
- JOB *job;
+ JOB *job;
if (ua->argc == 2 && strcmp(ua->argk[1], "job") == 0) {
job = (JOB *)GetResWithName(R_JOB, ua->argv[1]);
if (job) {
bsendmsg(ua, "pool=%s", job->pool->hdr.name);
bsendmsg(ua, "messages=%s", job->messages->hdr.name);
bsendmsg(ua, "client=%s", job->client->hdr.name);
- store = (STORE *)job->storage[0]->first();
+ store = (STORE *)job->storage->first();
bsendmsg(ua, "storage=%s", store->hdr.name);
bsendmsg(ua, "where=%s", job->RestoreWhere?job->RestoreWhere:"");
bsendmsg(ua, "level=%s", level_to_str(job->JobLevel));