} else {
P(jcr->mutex);
oldStatus = jcr->JobStatus;
- jcr->JobStatus = JS_Cancelled;
- if (!jcr->authenticated && jcr->JobStatus == JS_WaitFD) {
+ set_jcr_job_status(jcr, JS_Cancelled);
+ if (!jcr->authenticated && oldStatus == JS_WaitFD) {
pthread_cond_signal(&jcr->job_start_wait); /* wake waiting thread */
}
V(jcr->mutex);
if (jcr->file_bsock) {
bnet_sig(jcr->file_bsock, BNET_TERMINATE);
}
- bnet_fsend(dir, _("3000 Job %s Status=%c marked to be cancelled.\n"),
- jcr->Job, oldStatus);
+ bnet_fsend(dir, _("3000 Job %s marked to be cancelled.\n"), jcr->Job);
free_jcr(jcr);
}
} else {