[brasero] Try to fix #591880 - Image checksumming causes internal error
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero] Try to fix #591880 - Image checksumming causes internal error
- Date: Tue, 25 Aug 2009 13:13:12 +0000 (UTC)
commit 45a652c7928ffed237aeb9206236c144fb4c9523
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Tue Aug 25 14:15:39 2009 +0200
Try to fix #591880 - Image checksumming causes internal error
Also add a debug comment in case it doesn't
libbrasero-burn/brasero-burn.c | 48 +++++++++++++++------------------------
1 files changed, 19 insertions(+), 29 deletions(-)
---
diff --git a/libbrasero-burn/brasero-burn.c b/libbrasero-burn/brasero-burn.c
index e1e11ce..529fc4a 100644
--- a/libbrasero-burn/brasero-burn.c
+++ b/libbrasero-burn/brasero-burn.c
@@ -2088,6 +2088,7 @@ brasero_burn_record_session (BraseroBurn *burn,
gboolean erase_allowed,
GError **error)
{
+ const gchar *checksum = NULL;
BraseroBurnFlag session_flags;
BraseroTrack *track = NULL;
BraseroChecksumType type;
@@ -2189,38 +2190,25 @@ brasero_burn_record_session (BraseroBurn *burn,
if (type == BRASERO_CHECKSUM_MD5
|| type == BRASERO_CHECKSUM_SHA1
- || type == BRASERO_CHECKSUM_SHA256) {
- const gchar *checksum = NULL;
-
+ || type == BRASERO_CHECKSUM_SHA256)
checksum = brasero_track_get_checksum (track);
-
- /* the idea is to push a new track on the stack with
- * the current disc burnt and the checksum generated
- * during the session recording */
- track = BRASERO_TRACK (brasero_track_disc_new ());
- brasero_track_set_checksum (BRASERO_TRACK (track), type, checksum);
- }
- else if (type == BRASERO_CHECKSUM_MD5_FILE) {
- track = BRASERO_TRACK (brasero_track_disc_new ());
- brasero_track_set_checksum (BRASERO_TRACK (track),
- type,
- BRASERO_MD5_FILE);
- }
- else if (type == BRASERO_CHECKSUM_SHA1_FILE) {
- track = BRASERO_TRACK (brasero_track_disc_new ());
- brasero_track_set_checksum (BRASERO_TRACK (track),
- type,
- BRASERO_SHA1_FILE);
- }
- else if (type == BRASERO_CHECKSUM_SHA256_FILE) {
- track = BRASERO_TRACK (brasero_track_disc_new ());
- brasero_track_set_checksum (BRASERO_TRACK (track),
- type,
- BRASERO_SHA256_FILE);
- }
-
+ else if (type == BRASERO_CHECKSUM_MD5_FILE)
+ checksum = BRASERO_MD5_FILE;
+ else if (type == BRASERO_CHECKSUM_SHA1_FILE)
+ checksum = BRASERO_SHA1_FILE;
+ else if (type == BRASERO_CHECKSUM_SHA256_FILE)
+ checksum = BRASERO_SHA256_FILE;
+
+ /* the idea is to push a new track on the stack with
+ * the current disc burnt and the checksum generated
+ * during the session recording */
brasero_burn_session_push_tracks (priv->session);
+ track = BRASERO_TRACK (brasero_track_disc_new ());
+ brasero_track_set_checksum (BRASERO_TRACK (track),
+ type,
+ checksum);
+
brasero_track_disc_set_drive (BRASERO_TRACK_DISC (track), brasero_burn_session_get_burner (priv->session));
brasero_burn_session_add_track (priv->session, track, NULL);
@@ -2228,6 +2216,8 @@ brasero_burn_record_session (BraseroBurn *burn,
* anymore. BraseroBurnSession refs it. */
g_object_unref (track);
+ BRASERO_BURN_DEBUG (burn, "Preparing to checksum (type %i %s)", type, checksum);
+
/* this may be necessary for the drive to settle down and possibly be
* mounted by gnome-volume-manager (just temporarily) */
result = brasero_burn_sleep (burn, 5000);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]