]> git.sur5r.net Git - bacula/bacula/commitdiff
Make sure JobErrors is always nonzero on fatal error
authorKern Sibbald <kern@sibbald.com>
Wed, 3 Nov 2010 18:21:02 +0000 (19:21 +0100)
committerKern Sibbald <kern@sibbald.com>
Wed, 3 Nov 2010 18:23:23 +0000 (19:23 +0100)
bacula/src/lib/message.c

index ca6ed8d4169a7ea9392f9fbb15a3d05b88010edf..d13a079ca15c81e646dcd5db6aaca0d2d09e98be 100644 (file)
@@ -1264,6 +1264,9 @@ Jmsg(JCR *jcr, int type, utime_t mtime, const char *fmt,...)
        if (jcr) {
           set_jcr_job_status(jcr, JS_FatalError);
        }
+       if (jcr && jcr->JobErrors == 0) {
+          jcr->JobErrors = 1;
+       }
        break;
     case M_ERROR:
        len = bsnprintf(rbuf, sizeof(rbuf), _("%s JobId %u: Error: "), my_name, JobId);