From beb23b9761a7ffa3fdd7052d941ec447fbd93604 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Thu, 10 Jul 2014 14:02:13 +0200 Subject: [PATCH] Set pthread id in jcr at beginning so the job can be canceled. --- bacula/src/lib/jcr.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.39.5