From: Kern Sibbald Date: Sat, 26 Jul 2014 15:16:04 +0000 (+0200) Subject: Improve FD and SD cancel X-Git-Tag: Release-7.0.5~8 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=531f6fe2112578f8689ec5ffd43a61c6cb0fbfee;p=bacula%2Fbacula Improve FD and SD cancel --- diff --git a/bacula/src/filed/job.c b/bacula/src/filed/job.c index 207f02c68f..de3c7989f6 100644 --- a/bacula/src/filed/job.c +++ b/bacula/src/filed/job.c @@ -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); diff --git a/bacula/src/stored/dircmd.c b/bacula/src/stored/dircmd.c index 391883f0e8..0043a61482 100644 --- a/bacula/src/stored/dircmd.c +++ b/bacula/src/stored/dircmd.c @@ -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);