- dev_name(dev), strerror_dev(dev));
- Jmsg(jcr, M_FATAL, 0, _("Cannot fixup device error. %s\n"),
- strerror_dev(dev));
- ok = FALSE;
- break;
- }
- }
- sm_check(__FILE__, __LINE__, False);
- if (!ok) {
- break;
- }
- jcr->JobBytes += rec.data_len; /* increment bytes this job */
- Dmsg4(190, "write_record FI=%s SessId=%d Strm=%s len=%d\n",
- FI_to_ascii(rec.FileIndex), rec.VolSessionId,
- stream_to_ascii(rec.Stream), rec.data_len);
- /* Send attributes and MD5 to Director for Catalog */
- if (stream == STREAM_UNIX_ATTRIBUTES || stream == STREAM_MD5_SIGNATURE) {
- if (!dir_update_file_attributes(jcr, &rec)) {
- ok = FALSE;
- break;
- }
- }
- ASSERT(dsmsg == ds->msg);
- ASSERT(dsmsg == rec.data);
- sm_check(__FILE__, __LINE__, False);
+ dev->print_name(), dev->bstrerror());
+ ok = false;
+ break;
+ }
+ }
+ if (!ok) {
+ Dmsg0(400, "Not OK\n");
+ break;
+ }
+ jcr->JobBytes += rec.data_len; /* increment bytes this job */
+ Dmsg4(850, "write_record FI=%s SessId=%d Strm=%s len=%d\n",
+ FI_to_ascii(buf1, rec.FileIndex), rec.VolSessionId,
+ stream_to_ascii(buf2, rec.Stream, rec.FileIndex), rec.data_len);
+
+ /* Send attributes and digest to Director for Catalog */
+ if (stream == STREAM_UNIX_ATTRIBUTES || stream == STREAM_UNIX_ATTRIBUTES_EX ||
+ crypto_digest_stream_type(stream) != CRYPTO_DIGEST_NONE) {
+ if (!jcr->no_attributes) {
+ if (are_attributes_spooled(jcr)) {
+ jcr->dir_bsock->set_spooling();
+ }
+ Dmsg0(850, "Send attributes to dir.\n");
+ if (!dir_update_file_attributes(dcr, &rec)) {
+ jcr->dir_bsock->clear_spooling();
+ Jmsg(jcr, M_FATAL, 0, _("Error updating file attributes. ERR=%s\n"),
+ jcr->dir_bsock->bstrerror());
+ ok = false;
+ break;
+ }
+ jcr->dir_bsock->clear_spooling();
+ }
+ }
+ Dmsg0(650, "Enter bnet_get\n");