From cb898f0ea7096f4e2d207b38c5dc8d4c9d5b293a Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Mon, 10 Sep 2012 17:41:25 +0200 Subject: [PATCH] Add JobId to SD debug output --- bacula/src/stored/job.c | 2 ++ bacula/src/stored/stored.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bacula/src/stored/job.c b/bacula/src/stored/job.c index 7fabf57785..578f296cd3 100644 --- a/bacula/src/stored/job.c +++ b/bacula/src/stored/job.c @@ -111,6 +111,8 @@ bool job_cmd(JCR *jcr) } jcr->JobId = JobId; Dmsg2(800, "Start JobId=%d %p\n", JobId, jcr); + set_jcr_in_tsd(jcr); + /* * If job rescheduled because previous was incomplete, * the Resched flag is set and VolSessionId and VolSessionTime diff --git a/bacula/src/stored/stored.c b/bacula/src/stored/stored.c index b31b8392f2..a180cfa407 100644 --- a/bacula/src/stored/stored.c +++ b/bacula/src/stored/stored.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2011 Free Software Foundation Europe e.V. + Copyright (C) 2000-2012 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -249,6 +249,7 @@ int main (int argc, char *argv[]) read_state_file(me->working_directory, "bacula-sd", get_first_port_host_order(me->sdaddrs)); + set_jcr_in_tsd(INVALID_JCR); /* Make sure on Solaris we can run concurrent, watch dog + servers + misc */ set_thread_concurrency(me->max_concurrent_jobs * 2 + 4); lmgr_init_thread(); /* initialize the lockmanager stack */ -- 2.39.5