brasero r1777 - in trunk: . src src/plugins/checksum



Author: philippr
Date: Sun Jan 18 07:34:25 2009
New Revision: 1777
URL: http://svn.gnome.org/viewvc/brasero?rev=1777&view=rev

Log:
2009-01-18  Philippe Rouquier  <ykw localhost localdomain>

	Increased the number attempts at mounting to avoid bug
	Fix leak when cancelling in checksum file plugin

	* src/burn.c:
	* src/plugins/checksum/burn-checksum-files.c
	(brasero_checksum_files_get_file_checksum):


Modified:
   trunk/ChangeLog
   trunk/src/burn.c
   trunk/src/plugins/checksum/burn-checksum-files.c

Modified: trunk/src/burn.c
==============================================================================
--- trunk/src/burn.c	(original)
+++ trunk/src/burn.c	Sun Jan 18 07:34:25 2009
@@ -134,12 +134,9 @@
 #define BRASERO_BURN_PRIVATE(o)  (G_TYPE_INSTANCE_GET_PRIVATE ((o), BRASERO_TYPE_BURN, BraseroBurnPrivate))
 
 #define MAX_EJECT_ATTEMPTS	5
-#define MAX_MOUNT_ATTEMPTS	20
+#define MAX_MOUNT_ATTEMPTS	40
 #define MOUNT_TIMEOUT		500
 
-#define MAX_LOAD_ATTEMPTS	50
-#define LOAD_TIMEOUT		500
-
 static GObjectClass *parent_class = NULL;
 
 static void

Modified: trunk/src/plugins/checksum/burn-checksum-files.c
==============================================================================
--- trunk/src/plugins/checksum/burn-checksum-files.c	(original)
+++ trunk/src/plugins/checksum/burn-checksum-files.c	Sun Jan 18 07:34:25 2009
@@ -125,8 +125,11 @@
 	g_checksum_update (checksum, buffer, read_bytes);
 
 	while (read_bytes == BLOCK_SIZE) {
-		if (priv->cancel)
+		if (priv->cancel) {
+			fclose (file);
+			g_checksum_free (checksum);
 			return BRASERO_BURN_CANCEL;
+		}
 
 		read_bytes = fread (buffer, 1, BLOCK_SIZE, file);
 		g_checksum_update (checksum, buffer, read_bytes);



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