]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix .status return codes.
authorNicolas Boichat <nicolas@boichat.ch>
Sun, 22 Aug 2004 20:21:14 +0000 (20:21 +0000)
committerNicolas Boichat <nicolas@boichat.ch>
Sun, 22 Aug 2004 20:21:14 +0000 (20:21 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1550 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/dird/ua_status.c
bacula/src/stored/status.c

index 0383a8c3fdc2e523b7d93f6ed0438c4fdf412352..70f0bc8054735fde431f36e8df350efbef838ca2 100644 (file)
@@ -42,7 +42,7 @@ static void do_client_status(UAContext *ua, CLIENT *client);
 static void do_director_status(UAContext *ua);
 static void do_all_status(UAContext *ua);
 
-static char OKqstatus[]   = "2000 OK .status\n";
+static char OKqstatus[]   = "1000 OK .status\n";
 static char DotStatusJob[] = "JobId=%d JobStatus=%c JobErrors=%d\n";
 
 /*
@@ -59,7 +59,7 @@ int qstatus_cmd(UAContext *ua, const char *cmd)
    Dmsg1(20, "status:%s:\n", cmd);
 
    if ((ua->argc != 3) || (strcasecmp(ua->argk[1], "dir"))) {
-      bsendmsg(ua, "2900 Bad .status command, missing arguments.\n");
+      bsendmsg(ua, "1900 Bad .status command, missing arguments.\n");
       return 1;
    }
    
@@ -82,7 +82,7 @@ int qstatus_cmd(UAContext *ua, const char *cmd)
       }
    }
    else {
-      bsendmsg(ua, "2900 Bad .status command, wrong argument.\n");
+      bsendmsg(ua, "1900 Bad .status command, wrong argument.\n");
       return 1;
    }
   
index 5ae33f1dc0aee5fc0c52820d89768c10d87234c5..06ffdf991d51c4996bdf71701ed55f239b484aac 100644 (file)
@@ -43,7 +43,7 @@ extern int num_jobs_run;
 /* Static variables */
 static char qstatus[] = ".status %s\n";
 
-static char OKqstatus[]   = "2000 OK .status\n";
+static char OKqstatus[]   = "3000 OK .status\n";
 static char DotStatusJob[] = "JobId=%d JobStatus=%c JobErrors=%d\n";
 
 
@@ -432,7 +432,7 @@ int qstatus_cmd(JCR *jcr)
    if (sscanf(dir->msg, qstatus, time) != 1) {
       pm_strcpy(&jcr->errmsg, dir->msg);
       Jmsg1(jcr, M_FATAL, 0, _("Bad .status command: %s\n"), jcr->errmsg);
-      bnet_fsend(dir, "2900 Bad .status command, missing argument.\n");
+      bnet_fsend(dir, "3900 Bad .status command, missing argument.\n");
       bnet_sig(dir, BNET_EOD);
       return 0;
    }
@@ -459,7 +459,7 @@ int qstatus_cmd(JCR *jcr)
    else {
       pm_strcpy(&jcr->errmsg, dir->msg);
       Jmsg1(jcr, M_FATAL, 0, _("Bad .status command: %s\n"), jcr->errmsg);
-      bnet_fsend(dir, "2900 Bad .status command, wrong argument.\n");
+      bnet_fsend(dir, "3900 Bad .status command, wrong argument.\n");
       bnet_sig(dir, BNET_EOD);
       return 0;
    }