* <file-index> <stream> <info>
*/
if (!sd->fsend("%ld %d 0", jcr->JobFiles, stream)) {
- Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
- sd->bstrerror());
+ if (!job_canceled(jcr)) {
+ Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
+ sd->bstrerror());
+ }
goto err;
}
Dmsg1(300, ">stored: datahdr %s\n", sd->msg);
}
sd->msg = wbuf; /* set correct write buffer */
if (!sd->send()) {
- Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
- sd->bstrerror());
+ if (!job_canceled(jcr)) {
+ Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
+ sd->bstrerror());
+ }
goto err;
}
Dmsg1(130, "Send data to SD len=%d\n", sd->msglen);
sd->msglen = encrypted_len; /* set encrypted length */
sd->msg = jcr->crypto.crypto_buf; /* set correct write buffer */
if (!sd->send()) {
- Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
- sd->bstrerror());
+ if (!job_canceled(jcr)) {
+ Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
+ sd->bstrerror());
+ }
goto err;
}
Dmsg1(130, "Send data to SD len=%d\n", sd->msglen);
}
if (!sd->signal(BNET_EOD)) { /* indicate end of file data */
- Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
- sd->bstrerror());
+ if (!job_canceled(jcr)) {
+ Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
+ sd->bstrerror());
+ }
goto err;
}
* <file-index> <stream> <info>
*/
if (!sd->fsend("%ld %d 0", jcr->JobFiles, attr_stream)) {
- Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
- sd->bstrerror());
+ if (!job_canceled(jcr)) {
+ Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
+ sd->bstrerror());
+ }
return false;
}
Dmsg1(300, ">stored: attrhdr %s\n", sd->msg);
Dmsg2(300, ">stored: attr len=%d: %s\n", sd->msglen, sd->msg);
if (!stat) {
- Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
- sd->bstrerror());
+ if (!job_canceled(jcr)) {
+ Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
+ sd->bstrerror());
+ }
return false;
}
sd->signal(BNET_EOD); /* indicate end of attributes data */
Dmsg1(650, "End read loop with FD. Stat=%d\n", n);
if (ds->is_error()) {
- Dmsg1(350, "Network read error from FD. ERR=%s\n", ds->bstrerror());
- Jmsg1(jcr, M_FATAL, 0, _("Network error on data channel. ERR=%s\n"),
- ds->bstrerror());
+ if (!job_canceled(jcr)) {
+ Dmsg1(350, "Network read error from FD. ERR=%s\n", ds->bstrerror());
+ Jmsg1(jcr, M_FATAL, 0, _("Network error on data channel. ERR=%s\n"),
+ ds->bstrerror());
+ }
ok = false;
break;
}
Dmsg0(90, "back from write_end_session_label()\n");
/* Flush out final partial block of this session */
if (!write_block_to_device(dcr)) {
- Jmsg2(jcr, M_FATAL, 0, _("Fatal append error on device %s: ERR=%s\n"),
- dev->print_name(), dev->bstrerror());
- Dmsg0(100, _("Set ok=FALSE after write_block_to_device.\n"));
+ if (!job_canceled(jcr)) {
+ Jmsg2(jcr, M_FATAL, 0, _("Fatal append error on device %s: ERR=%s\n"),
+ dev->print_name(), dev->bstrerror());
+ Dmsg0(100, _("Set ok=FALSE after write_block_to_device.\n"));
+ }
ok = false;
}
if (dev->VolCatInfo.VolCatName[0] == 0) {
if (strncmp(fd_cmds[i].cmd, fd->msg, strlen(fd_cmds[i].cmd)) == 0) {
found = true; /* indicate command found */
jcr->errmsg[0] = 0;
- if (!fd_cmds[i].func(jcr) || job_canceled(jcr)) { /* do command */
+ if (!fd_cmds[i].func(jcr)) { /* do command */
/* Note fd->msg command may be destroyed by comm activity */
- if (jcr->errmsg[0]) {
- Jmsg1(jcr, M_FATAL, 0, _("Command error with FD, hanging up. %s\n"),
- jcr->errmsg);
- } else {
- Jmsg0(jcr, M_FATAL, 0, _("Command error with FD, hanging up.\n"));
+ if (!job_canceled(jcr)) {
+ if (jcr->errmsg[0]) {
+ Jmsg1(jcr, M_FATAL, 0, _("Command error with FD, hanging up. %s\n"),
+ jcr->errmsg);
+ } else {
+ Jmsg0(jcr, M_FATAL, 0, _("Command error with FD, hanging up.\n"));
+ }
+ set_jcr_job_status(jcr, JS_ErrorTerminated);
}
- set_jcr_job_status(jcr, JS_ErrorTerminated);
quit = true;
}
break;