brasero r1177 - in trunk: . src
- From: philippr svn gnome org
- To: svn-commits-list gnome org
- Subject: brasero r1177 - in trunk: . src
- Date: Tue, 26 Aug 2008 17:29:38 +0000 (UTC)
Author: philippr
Date: Tue Aug 26 17:29:38 2008
New Revision: 1177
URL: http://svn.gnome.org/viewvc/brasero?rev=1177&view=rev
Log:
Fix for #547742 â brasero crashed with SIGSEGV in brasero_medium_get_write_speeds()
When resorting to page 2A we didn\'t add the max write speed to the list
which was then empty
* src/burn-medium.c (brasero_medium_get_page_2A_max_speed),
(brasero_medium_get_sessions_info):
* src/scsi-read-track-information.c (brasero_read_track_info):
* src/scsi-read-track-information.h:
Modified:
trunk/ChangeLog
trunk/src/burn-medium.c
trunk/src/scsi-read-track-information.c
trunk/src/scsi-read-track-information.h
Modified: trunk/src/burn-medium.c
==============================================================================
--- trunk/src/burn-medium.c (original)
+++ trunk/src/burn-medium.c Tue Aug 26 17:29:38 2008
@@ -874,6 +874,12 @@
priv->max_rd = BRASERO_GET_16 (page_2A->rd_max_speed);
priv->max_wrt = BRASERO_GET_16 (page_2A->wr_max_speed);
+ /* also add it to the speed descriptors */
+ priv->wr_speeds = g_new0 (gint, 2);
+ priv->wr_speeds [0] = BRASERO_GET_16 (page_2A->wr_max_speed);
+ priv->rd_speeds = g_new0 (gint, 2);
+ priv->rd_speeds [0] = BRASERO_GET_16 (page_2A->rd_max_speed);
+
g_free (data);
return BRASERO_BURN_OK;
}
@@ -1279,7 +1285,7 @@
sizeof (BraseroScsiTocDesc);
/* remove 1 for leadout */
- multisession = (priv->info & BRASERO_MEDIUM_APPENDABLE) || (num -1) != 1;
+ multisession = (priv->info & BRASERO_MEDIUM_APPENDABLE) && (num -1) != 1;
BRASERO_BURN_LOG ("%i track(s) found", num);
@@ -1287,8 +1293,10 @@
for (i = 0; i < num; i ++, desc ++) {
BraseroMediumTrack *track;
- if (desc->track_num == BRASERO_SCSI_TRACK_LEADOUT_START)
+ if (desc->track_num == BRASERO_SCSI_TRACK_LEADOUT_START) {
+ BRASERO_BURN_LOG ("Leadout reached %d", BRASERO_GET_32 (desc->track_start));
break;
+ }
track = g_new0 (BraseroMediumTrack, 1);
priv->tracks = g_slist_prepend (priv->tracks, track);
Modified: trunk/src/scsi-read-track-information.c
==============================================================================
--- trunk/src/scsi-read-track-information.c (original)
+++ trunk/src/scsi-read-track-information.c Tue Aug 26 17:29:38 2008
@@ -134,7 +134,7 @@
BRASERO_SET_16 (cdb->alloc_len, datasize);
res = brasero_scsi_command_issue_sync (cdb, info, datasize, error);
- if (!res) {
+ if (res == BRASERO_SCSI_OK) {
if (datasize != BRASERO_GET_16 (info->len) + sizeof (info->len))
BRASERO_BURN_LOG ("Sizes mismatch asked %i / received %i",
datasize,
Modified: trunk/src/scsi-read-track-information.h
==============================================================================
--- trunk/src/scsi-read-track-information.h (original)
+++ trunk/src/scsi-read-track-information.h Tue Aug 26 17:29:38 2008
@@ -73,11 +73,11 @@
uchar track_num_high;
uchar session_num_high;
- uchar reserved2 [2];
+ uchar reserved2 [2]; /* 36 bytes MMC1 */
- uchar rd_compat_lba [4];
+ uchar rd_compat_lba [4]; /* 40 bytes */
uchar next_layer_jmp [4];
- uchar last_layer_jmp [4];
+ uchar last_layer_jmp [4]; /* 48 bytes */
};
#else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]