- Figure out how to use ssh or stunnel to protect Bacula communications.
For 1.31 release:
+- Fix first block number after label to be zero instead of 1 (reset after label).
- Grep for Backup OK in regression script.
- Do NOT reuse same JobId if tape written.
- Move JobFiles and JobBytes to SD rather than FD -- more correct.
for ( ; bsock != NULL; bsock = next) {
next = bsock->next;
if (!bsock->duped) {
- close(bsock->fd);
+ if (bsock->timed_out) {
+ shutdown(bsock->fd, 2); /* discard any pending I/O */
+ }
+ close(bsock->fd); /* normal close */
}
term_bsock(bsock);
}
do_close(dev);
}
dev->use_count--;
+#ifdef FULL_DEBUG
+ ASSERT(dev->use_count >= 0);
+#endif
}
/*
Dmsg0(29, "really close_dev\n");
do_close(dev);
dev->use_count--;
+#ifdef FULL_DEBUG
+ ASSERT(dev->use_count >= 0);
+#endif
}
int truncate_dev(DEVICE *dev)
create_volume_label_record(jcr, dev, &rec);
empty_block(block); /* Volume label always at beginning */
+ block->BlockNumber = 0;
if (!write_record_to_block(block, &rec)) {
free_pool_memory(rec.data);
Jmsg1(jcr, M_FATAL, 0, _("Cannot write Volume label to block for device %s\n"),
}
if (block->block_read) {
- if (++BlockNumber != block->BlockNumber) {
+ if (BlockNumber != block->BlockNumber) {
Jmsg(jcr, M_ERROR, 0, _("Invalid block number. Expected %u, got %u\n"),
BlockNumber, block->BlockNumber);
}
- BlockNumber = block->BlockNumber;
+ BlockNumber = block->BlockNumber + 1;
block->block_read = false;
}
#define SMCHECK
#define TRACE_FILE 1
+#define FULL_DEBUG 1 /* normally on for testing only */
+
/* Turn this on ONLY if you want all Dmsg() to append to the
* trace file. Implemented mainly for Win32 ...
*/
/* Turn this on if you want to try the new Job semaphore code */
#define USE_SEMAPHORE
-/* IF you undefine this, Bacula will run 10X slower */
-#define NO_POLL_TEST 1
-
/* #define NO_ATTRIBUTES_TEST 1 */
/* #define NO_TAPE_WRITE_TEST 1 */
/* #define FD_NO_SEND TEST 1 */