]> git.sur5r.net Git - bacula/bacula/commitdiff
Take a more conservative approach for setting killable true
authorKern Sibbald <kern@sibbald.com>
Wed, 1 Nov 2017 08:40:34 +0000 (09:40 +0100)
committerKern Sibbald <kern@sibbald.com>
Wed, 1 Nov 2017 08:40:34 +0000 (09:40 +0100)
bacula/src/filed/job.c
bacula/src/stored/dircmd.c

index 305dfa7eb9e6c004b6afd2094f131426698f8fb1..4d0cc0d3481a13270a26fe1f21249be928af871e 100644 (file)
@@ -282,6 +282,7 @@ static void *handle_director_request(BSOCK *dir)
    jcr->crypto.pki_recipients = me->pki_recipients;
 
    dir->set_jcr(jcr);
+   jcr->set_killable(true);    /* allow dir to kill/cancel job */
    /* Initialize SD start condition variable */
    int errstat = pthread_cond_init(&jcr->job_start_wait, NULL);
    if (errstat != 0) {
index 0519a141d9035e8db557d905c3e0fe9387305ac3..dba2491b76af465adf6a48392eca59b07c6685bd 100644 (file)
@@ -215,6 +215,8 @@ void *handle_connection_request(void *arg)
 
    dequeue_messages(jcr);     /* dequeue any daemon messages */
 
+   jcr->set_killable(true);    /* allow dir to kill/cancel job */
+
    for (quit=false; !quit;) {
       /* Read command */
       if ((bnet_stat = bs->recv()) <= 0) {