]> git.sur5r.net Git - bacula/bacula/commitdiff
Improve FD and SD cancel
authorKern Sibbald <kern@sibbald.com>
Sat, 26 Jul 2014 15:16:04 +0000 (17:16 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 26 Jul 2014 15:16:04 +0000 (17:16 +0200)
bacula/src/filed/job.c
bacula/src/stored/dircmd.c

index 207f02c68f41554bc23d1b5d41753124bb3bcbf6..de3c7989f6f3a338ad8da47938ec24d0bb240c40 100644 (file)
@@ -568,8 +568,8 @@ static int cancel_cmd(JCR *jcr)
       if (cjcr->store_bsock) {
          cjcr->store_bsock->set_timed_out();
          cjcr->store_bsock->set_terminated();
-         cjcr->my_thread_send_signal(TIMEOUT_SIGNAL);
       }
+      cjcr->my_thread_send_signal(TIMEOUT_SIGNAL);
       free_jcr(cjcr);
       dir->fsend(_("2001 Job \"%s\" marked to be %s.\n"),
          Job, reason);
index 391883f0e8e2ad7e66357b121840965ca605b923..0043a6148234f744f28612a6ab2afb5020e5a1b4 100644 (file)
@@ -508,6 +508,7 @@ static bool cancel_cmd(JCR *cjcr)
          Dmsg1(100, "JobId=%u broadcast wait_device_release\n", (uint32_t)jcr->JobId);
          pthread_cond_broadcast(&wait_device_release);
       }
+      jcr->my_thread_send_signal(TIMEOUT_SIGNAL);
       dir->fsend(_("3000 JobId=%ld Job=\"%s\" marked to be %s.\n"),
          jcr->JobId, jcr->Job, reason);
       free_jcr(jcr);