X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Ffiled%2Fheartbeat.c;h=e6da67d41d47f3ba551cf7665e0e648481c6b56e;hb=e7234bd0b538e9fa3b356c4a326eaf801afef4d9;hp=8e1c033d22ccee69ef689bdb2fa26f2157493afc;hpb=86656399f87479a84140c3a4ae00d06be8b13cd8;p=bacula%2Fbacula diff --git a/bacula/src/filed/heartbeat.c b/bacula/src/filed/heartbeat.c index 8e1c033d22..e6da67d41d 100644 --- a/bacula/src/filed/heartbeat.c +++ b/bacula/src/filed/heartbeat.c @@ -41,6 +41,9 @@ #define WAIT_INTERVAL 60 #endif +extern bool no_signals; + + /* * Listen on the SD socket for heartbeat signals. * Send heartbeats to the Director every HB_TIME @@ -90,6 +93,9 @@ static void *sd_heartbeat_thread(void *arg) /* Startup the heartbeat thread -- see above */ void start_heartbeat_monitor(JCR *jcr) { + if (no_signals) { + return; + } jcr->hb_bsock = NULL; pthread_create(&jcr->heartbeat_id, NULL, sd_heartbeat_thread, (void *)jcr); } @@ -98,6 +104,9 @@ void start_heartbeat_monitor(JCR *jcr) void stop_heartbeat_monitor(JCR *jcr) { int cnt = 0; + if (no_signals) { + return; + } /* Wait max 10 secs for heartbeat thread to start */ while (jcr->hb_bsock == NULL && cnt++ < 200) { bmicrosleep(0, 50); /* avoid race */