}
good_rtn:
- rtnstat = 1; /* good return */
+ rtnstat = jcr->is_job_canceled() ? 0 : 1; /* good return if not canceled */
bail_out:
if (ff_pkt->cmd_plugin && plugin_started) {
}
Dmsg2(100, "Object compressed from %d to %d bytes\n", ff_pkt->object_len, comp_len);
}
- sd->msglen = Mmsg(sd->msg, "%d %d %d %d %d %d %s%c%s%c",
+ sd->msglen = Mmsg(sd->msg, "%d %d %d %d %d %d %s%c%s%c",
jcr->JobFiles, ff_pkt->type, ff_pkt->object_index,
comp_len, ff_pkt->object_len, ff_pkt->object_compression,
ff_pkt->fname, 0, ff_pkt->object_name, 0);
break;
case FT_REG:
stat = sd->fsend("%ld %d %s%c%s%c%c%s%c%d%c", jcr->JobFiles,
- ff_pkt->type, ff_pkt->fname, 0, attribs, 0, 0, attribsEx, 0,
+ ff_pkt->type, ff_pkt->fname, 0, attribs, 0, 0, attribsEx, 0,
ff_pkt->delta_seq, 0);
break;
default:
stat = sd->fsend("%ld %d %s%c%s%c%c%s%c%u%c", jcr->JobFiles,
- ff_pkt->type, ff_pkt->fname, 0, attribs, 0, 0,
+ ff_pkt->type, ff_pkt->fname, 0, attribs, 0, 0,
attribsEx, 0, ff_pkt->delta_seq, 0);
break;
}
if (!(cjcr=get_jcr_by_full_name(Job))) {
dir->fsend(_("2901 Job %s not found.\n"), Job);
} else {
+ generate_plugin_event(cjcr, bEventCancelCommand, NULL);
+ set_jcr_job_status(cjcr, JS_Canceled);
if (cjcr->store_bsock) {
cjcr->store_bsock->set_timed_out();
cjcr->store_bsock->set_terminated();
cjcr->my_thread_send_signal(TIMEOUT_SIGNAL);
}
- generate_plugin_event(cjcr, bEventCancelCommand, NULL);
- set_jcr_job_status(cjcr, JS_Canceled);
free_jcr(cjcr);
dir->fsend(_("2001 Job %s marked to be canceled.\n"), Job);
}