From: Kern Sibbald Date: Thu, 10 Jul 2014 12:02:13 +0000 (+0200) Subject: Set pthread id in jcr at beginning so the job can be canceled. X-Git-Tag: Release-7.0.5~27 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=beb23b9761a7ffa3fdd7052d941ec447fbd93604;p=bacula%2Fbacula Set pthread id in jcr at beginning so the job can be canceled. --- diff --git a/bacula/src/lib/jcr.c b/bacula/src/lib/jcr.c index baf664f75c..ab56a6b4ec 100644 --- a/bacula/src/lib/jcr.c +++ b/bacula/src/lib/jcr.c @@ -332,6 +332,8 @@ JCR *new_jcr(int size, JCR_free_HANDLER *daemon_free_jcr) } jcr = (JCR *)malloc(size); memset(jcr, 0, size); + /* Note for the director, this value is changed in jobq.c */ + jcr->my_thread_id = pthread_self(); jcr->msg_queue = New(dlist(item, &item->link)); if ((status = pthread_mutex_init(&jcr->msg_queue_mutex, NULL)) != 0) { berrno be;