diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index 472d3dc..b67f4be 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2009.04.30.065918" +#define Cdrskin_timestamP "2009.04.30.070813" diff --git a/libburn/sg-freebsd.c b/libburn/sg-freebsd.c index 9f232dc..cc5ab4e 100644 --- a/libburn/sg-freebsd.c +++ b/libburn/sg-freebsd.c @@ -1,6 +1,5 @@ /* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */ -#include #include #include #include @@ -553,11 +552,26 @@ int sg_issue_command(struct burn_drive *d, struct command *c) if (c->page) { ccb->csio.data_ptr = c->page->data; if (c->dir == FROM_DRIVE) { - ccb->csio.dxfer_len = BUFFER_SIZE; + + /* ts A90430 : Ticket 148 , by jwehle : + "On ... FreeBSD 6.4 which has a usb memory reader in + addition to a ATAPI DVD burner sg_issue_command + will hang while the SCSI bus is being scanned" + */ + if (c->dxfer_len >= 0) + ccb->csio.dxfer_len = c->dxfer_len; + else + ccb->csio.dxfer_len = BUFFER_SIZE; + /* touch page so we can use valgrind */ memset(c->page->data, 0, BUFFER_SIZE); } else { - assert(c->page->bytes > 0); + /* ts A90430 */ + /* a ssert(c->page->bytes > 0); */ + if (c->page->bytes <= 0) { + c->error = 1; + return 0; + } ccb->csio.dxfer_len = c->page->bytes; } } else {