if (!(jcr=get_jcr_by_full_name(Job))) {
bnet_fsend(dir, _("3904 Job %s not found.\n"), Job);
} else {
- P(jcr->mutex);
+ jcr->lock();
oldStatus = jcr->JobStatus;
set_jcr_job_status(jcr, JS_Canceled);
if (!jcr->authenticated && oldStatus == JS_WaitFD) {
pthread_cond_signal(&jcr->job_start_wait); /* wake waiting thread */
}
- V(jcr->mutex);
+ jcr->unlock();
if (jcr->file_bsock) {
bnet_sig(jcr->file_bsock, BNET_TERMINATE);
}
if (dcr) {
dev = dcr->dev;
P(dev->mutex); /* Use P to avoid indefinite block */
- if (!dev->device->changer_res) {
+ if (!dev->device->changer_res) {
bnet_fsend(dir, _("3995 Device %s is not an autochanger.\n"),
dev->print_name());
/* Under certain "safe" conditions, we can steal the lock */