]> git.sur5r.net Git - bacula/bacula/commitdiff
Set pthread id in jcr at beginning so the job can be canceled.
authorKern Sibbald <kern@sibbald.com>
Thu, 10 Jul 2014 12:02:13 +0000 (14:02 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 12 Jul 2014 14:04:23 +0000 (16:04 +0200)
bacula/src/lib/jcr.c

index baf664f75c3ddfd356d01fd5438935c61a509286..ab56a6b4ec0010a1285a89c08574b53fb66a2582 100644 (file)
@@ -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;