BSOCK *fd_sock = jcr->file_bsock;
bool ok = true;
DEV_RECORD rec;
- DCR *dcr = jcr->dcr;
- DEVICE *dev = dcr->dev;
char buf1[100], buf2[100];
+ DCR *dcr = jcr->dcr;
+ DEVICE *dev;
+
+ if (!dcr) {
+ Jmsg0(jcr, M_FATAL, 0, _("DCR is NULL!!!\n"));
+ return false;
+ }
+ dev = dcr->dev;
+ if (!dev) {
+ Jmsg0(jcr, M_FATAL, 0, _("DEVICE is NULL!!!\n"));
+ return false;
+ }
- Dmsg0(100, "Start append data.\n");
+ Dmsg1(100, "Start append data. res=%d\n", dev->reserved_device);
memset(&rec, 0, sizeof(rec));
if (!bnet_set_buffer_size(ds, dcr->device->max_network_buffer_size, BNET_SETBUF_WRITE)) {
set_jcr_job_status(jcr, JS_ErrorTerminated);
- Jmsg(jcr, M_FATAL, 0, _("Unable to set network buffer size.\n"));
+ Jmsg0(jcr, M_FATAL, 0, _("Unable to set network buffer size.\n"));
return false;
}
FI_to_ascii(buf1, rec.FileIndex), rec.VolSessionId,
stream_to_ascii(buf2, rec.Stream, rec.FileIndex), rec.data_len);
- /* Send attributes and MD5 to Director for Catalog */
+ /* Send attributes and digest to Director for Catalog */
if (stream == STREAM_UNIX_ATTRIBUTES || stream == STREAM_MD5_SIGNATURE ||
stream == STREAM_UNIX_ATTRIBUTES_EX || stream == STREAM_SHA1_SIGNATURE) {
if (!jcr->no_attributes) {