]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix #2890 about segfault in .status command on Redhat 5 32bit
authorEric Bollengier <eric@baculasystems.com>
Wed, 7 Jun 2017 07:29:34 +0000 (09:29 +0200)
committerKern Sibbald <kern@sibbald.com>
Wed, 7 Jun 2017 07:55:23 +0000 (09:55 +0200)
bacula/src/filed/status.c

index c8b38ef3f9595aacb8558070f77eafd4c608c490..0327a82b36f04f529b31879c36e585a42683863f 100644 (file)
@@ -263,8 +263,9 @@ static void  list_running_jobs_api(STATUS_PKT *sp)
       p = ow.get_output(OT_CLEAR, OT_START_OBJ, OT_END);
 
       if (njcr->JobId == 0) {
+         int val = (njcr->dir_bsock && njcr->dir_bsock->tls)?1:0;
          ow.get_output(OT_UTIME, "DirectorConnected", njcr->start_time,
-                       OT_INT, "DirTLS", (njcr->dir_bsock && njcr->dir_bsock->tls)?1:0,
+                       OT_INT, "DirTLS", val,
                        OT_END);
       } else {
          ow.get_output(OT_INT32,   "JobId", njcr->JobId,