brasero r1385 - in trunk: . src



Author: philippr
Date: Thu Oct 16 20:12:56 2008
New Revision: 1385
URL: http://svn.gnome.org/viewvc/brasero?rev=1385&view=rev

Log:
	Try to fix
	#556449 â Session error : Insufficient space on media when copying an audio CD (same problem with trunk)

	* src/burn-medium.c (brasero_medium_track_set_leadout):
	* src/scsi-mode-sense.c (brasero_spc1_mode_sense_get_page):


Modified:
   trunk/ChangeLog
   trunk/src/burn-medium.c
   trunk/src/scsi-mode-pages.h
   trunk/src/scsi-mode-sense.c

Modified: trunk/src/burn-medium.c
==============================================================================
--- trunk/src/burn-medium.c	(original)
+++ trunk/src/burn-medium.c	Thu Oct 16 20:12:56 2008
@@ -1515,8 +1515,7 @@
 
 	priv = BRASERO_MEDIUM_PRIVATE (self);
 
-	if (BRASERO_MEDIUM_IS (priv->info, BRASERO_MEDIUM_DVDRW_PLUS)
-	||  BRASERO_MEDIUM_IS (priv->info, BRASERO_MEDIUM_DVDRW_RESTRICTED)) {
+	if (BRASERO_MEDIUM_RANDOM_WRITABLE (priv->info)) {
 		BRASERO_BURN_LOG ("Overwritable medium  => skipping");
 		return BRASERO_BURN_OK;
 	}
@@ -1529,22 +1528,23 @@
 						   &data,
 						   &size,
 						   code);
-	if (result != BRASERO_SCSI_OK) {
+	if (result == BRASERO_SCSI_OK) {
+		wrt_page = (BraseroScsiWritePage *) &data->page;
+		wrt_page->write_type = BRASERO_SCSI_WRITE_TAO;
+
+		result = brasero_spc1_mode_select (handle, data, size, code);
 		g_free (data);
 
-		BRASERO_BURN_LOG ("MODE SENSE failed");
-		return BRASERO_BURN_ERR;
+		if (result != BRASERO_SCSI_OK) {
+			BRASERO_BURN_LOG ("MODE SELECT failed");
+			return BRASERO_BURN_ERR;
+		}
 	}
+	else {
+		BRASERO_BURN_LOG ("MODE SENSE failed");
 
-	wrt_page = (BraseroScsiWritePage *) &data->page;
-	wrt_page->write_type = BRASERO_SCSI_WRITE_TAO;
-
-	result = brasero_spc1_mode_select (handle, data, size, code);
-	g_free (data);
-
-	if (result != BRASERO_SCSI_OK) {
-		BRASERO_BURN_LOG ("MODE SELECT failed");
-		return BRASERO_BURN_ERR;
+		/* This isn't necessarily a problem */
+		//		return BRASERO_BURN_ERR;
 	}
 
 	/* at this point we know the type of the disc that's why we set the 

Modified: trunk/src/scsi-mode-pages.h
==============================================================================
--- trunk/src/scsi-mode-pages.h	(original)
+++ trunk/src/scsi-mode-pages.h	Thu Oct 16 20:12:56 2008
@@ -36,7 +36,7 @@
 struct _BraseroScsiModePage {
 	uchar code			:6;
 	uchar reserved			:1;
-	uchar ps				:1;
+	uchar ps			:1;
 
 	uchar len;
 };

Modified: trunk/src/scsi-mode-sense.c
==============================================================================
--- trunk/src/scsi-mode-sense.c	(original)
+++ trunk/src/scsi-mode-sense.c	Thu Oct 16 20:12:56 2008
@@ -114,6 +114,7 @@
 	BRASERO_SET_16 (cdb->alloc_len, sizeof (header));
 	bzero (&header, sizeof (header));
 
+	BRASERO_BURN_LOG ("Getting page size");
 	res = brasero_scsi_command_issue_sync (cdb, &header, sizeof (header), error);
 	if (res)
 		goto end;
@@ -147,6 +148,8 @@
 	buffer = (BraseroScsiModeData *) g_new0 (uchar, request_size);
 
 	/* ... re-issue the command */
+	BRASERO_BURN_LOG ("Getting page (size = %i)", request_size);
+
 	BRASERO_SET_16 (cdb->alloc_len, request_size);
 	res = brasero_scsi_command_issue_sync (cdb, buffer, request_size, error);
 	if (res) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]