brasero r2009 - in trunk: . src src/plugins/checksum src/plugins/dvdcss src/plugins/libburnia src/plugins/local-track



Author: philippr
Date: Thu Feb 26 20:12:27 2009
New Revision: 2009
URL: http://svn.gnome.org/viewvc/brasero?rev=2009&view=rev

Log:
2009-02-26  Philippe Rouquier  <bonfire-app wanadoo fr>

	Fix rare race condition happening with fast CPU as in bug 
	#568495 â Can't burn more than 29mb DVD comment #15

	* src/burn-job.c (brasero_job_finished_session):
	* src/plugins/checksum/burn-checksum-files.c
	(brasero_checksum_files_start):
	* src/plugins/checksum/burn-checksum-image.c
	(brasero_checksum_image_start):
	* src/plugins/dvdcss/burn-dvdcss.c (brasero_dvdcss_start):
	* src/plugins/libburnia/burn-libisofs.c
	(brasero_libisofs_create_volume):
	* src/plugins/local-track/burn-local-image.c
	(brasero_local_track_start_thread):
	* src/plugins/local-track/burn-uri.c
	(brasero_burn_uri_start_thread):

Modified:
   trunk/ChangeLog
   trunk/src/burn-job.c
   trunk/src/plugins/checksum/burn-checksum-files.c
   trunk/src/plugins/checksum/burn-checksum-image.c
   trunk/src/plugins/dvdcss/burn-dvdcss.c
   trunk/src/plugins/libburnia/burn-libisofs.c
   trunk/src/plugins/local-track/burn-local-image.c
   trunk/src/plugins/local-track/burn-uri.c

Modified: trunk/src/burn-job.c
==============================================================================
--- trunk/src/burn-job.c	(original)
+++ trunk/src/burn-job.c	Thu Feb 26 20:12:27 2009
@@ -1022,7 +1022,7 @@
 
 	priv = BRASERO_JOB_PRIVATE (self);
 
-	BRASERO_JOB_LOG (self, "finished successfully session");
+	BRASERO_JOB_LOG (self, "Finished successfully session");
 
 	if (brasero_job_is_last_active (self))
 		return brasero_task_ctx_finished (priv->ctx);

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	Thu Feb 26 20:12:27 2009
@@ -1252,6 +1252,7 @@
 			      GError **error)
 {
 	BraseroChecksumFilesPrivate *priv;
+	GError *thread_error = NULL;
 	BraseroJobAction action;
 
 	brasero_job_get_action (job, &action);
@@ -1267,11 +1268,16 @@
 	priv->thread = g_thread_create (brasero_checksum_files_thread,
 					BRASERO_CHECKSUM_FILES (job),
 					TRUE,
-					error);
+					&thread_error);
 	g_mutex_unlock (priv->mutex);
 
-	if (!priv->thread)
+	/* Reminder: this is not necessarily an error as the thread may have finished */
+	//if (!priv->thread)
+	//	return BRASERO_BURN_ERR;
+	if (thread_error) {
+		g_propagate_error (error, thread_error);
 		return BRASERO_BURN_ERR;
+	}
 
 	return BRASERO_BURN_OK;
 }

Modified: trunk/src/plugins/checksum/burn-checksum-image.c
==============================================================================
--- trunk/src/plugins/checksum/burn-checksum-image.c	(original)
+++ trunk/src/plugins/checksum/burn-checksum-image.c	Thu Feb 26 20:12:27 2009
@@ -594,6 +594,7 @@
 			      GError **error)
 {
 	BraseroChecksumImagePrivate *priv;
+	GError *thread_error = NULL;
 	BraseroJobAction action;
 
 	brasero_job_get_action (job, &action);
@@ -615,11 +616,16 @@
 	priv->thread = g_thread_create (brasero_checksum_image_thread,
 					BRASERO_CHECKSUM_IMAGE (job),
 					TRUE,
-					error);
+					&thread_error);
 	g_mutex_unlock (priv->mutex);
 
-	if (!priv->thread)
+	/* Reminder: this is not necessarily an error as the thread may have finished */
+	//if (!priv->thread)
+	//	return BRASERO_BURN_ERR;
+	if (thread_error) {
+		g_propagate_error (error, thread_error);
 		return BRASERO_BURN_ERR;
+	}
 
 	return BRASERO_BURN_OK;
 }

Modified: trunk/src/plugins/dvdcss/burn-dvdcss.c
==============================================================================
--- trunk/src/plugins/dvdcss/burn-dvdcss.c	(original)
+++ trunk/src/plugins/dvdcss/burn-dvdcss.c	Thu Feb 26 20:12:27 2009
@@ -524,6 +524,7 @@
 	BraseroDvdcss *self;
 	BraseroJobAction action;
 	BraseroDvdcssPrivate *priv;
+	GError *thread_error = NULL;
 
 	self = BRASERO_DVDCSS (job);
 	priv = BRASERO_DVDCSS_PRIVATE (self);
@@ -554,11 +555,16 @@
 	priv->thread = g_thread_create (brasero_dvdcss_write_image_thread,
 					self,
 					TRUE,
-					error);
+					&thread_error);
 	g_mutex_unlock (priv->mutex);
 
-	if (!priv->thread)
+	/* Reminder: this is not necessarily an error as the thread may have finished */
+	//if (!priv->thread)
+	//	return BRASERO_BURN_ERR;
+	if (thread_error) {
+		g_propagate_error (error, thread_error);
 		return BRASERO_BURN_ERR;
+	}
 
 	return BRASERO_BURN_OK;
 }

Modified: trunk/src/plugins/libburnia/burn-libisofs.c
==============================================================================
--- trunk/src/plugins/libburnia/burn-libisofs.c	(original)
+++ trunk/src/plugins/libburnia/burn-libisofs.c	Thu Feb 26 20:12:27 2009
@@ -838,6 +838,7 @@
 brasero_libisofs_create_volume (BraseroLibisofs *self, GError **error)
 {
 	BraseroLibisofsPrivate *priv;
+	GError *thread_error = NULL;
 
 	priv = BRASERO_LIBISOFS_PRIVATE (self);
 	if (priv->thread)
@@ -856,10 +857,16 @@
 	priv->thread = g_thread_create (brasero_libisofs_create_volume_thread,
 					self,
 					TRUE,
-					error);
+					&thread_error);
 	g_mutex_unlock (priv->mutex);
-	if (!priv->thread)
+
+	/* Reminder: this is not necessarily an error as the thread may have finished */
+	//if (!priv->thread)
+	//	return BRASERO_BURN_ERR;
+	if (thread_error) {
+		g_propagate_error (error, thread_error);
 		return BRASERO_BURN_ERR;
+	}
 
 	return BRASERO_BURN_OK;
 }

Modified: trunk/src/plugins/local-track/burn-local-image.c
==============================================================================
--- trunk/src/plugins/local-track/burn-local-image.c	(original)
+++ trunk/src/plugins/local-track/burn-local-image.c	Thu Feb 26 20:12:27 2009
@@ -778,23 +778,30 @@
 				  GError **error)
 {
 	BraseroLocalTrackPrivate *priv;
+	GError *thread_error = NULL;
 
 	priv = BRASERO_LOCAL_TRACK_PRIVATE (self);
 
 	if (priv->thread)
 		return BRASERO_BURN_RUNNING;
 
+	priv->cancel = g_cancellable_new ();
+
 	g_mutex_lock (priv->mutex);
 	priv->thread = g_thread_create (brasero_local_track_thread,
 					self,
 					TRUE,
-					error);
+					&thread_error);
 	g_mutex_unlock (priv->mutex);
 
-	if (!priv->thread) 
+	/* Reminder: this is not necessarily an error as the thread may have finished */
+	//if (!priv->thread)
+	//	return BRASERO_BURN_ERR;
+	if (thread_error) {
+		g_propagate_error (error, thread_error);
 		return BRASERO_BURN_ERR;
+	}
 
-	priv->cancel = g_cancellable_new ();
 	return BRASERO_BURN_OK;
 }
 

Modified: trunk/src/plugins/local-track/burn-uri.c
==============================================================================
--- trunk/src/plugins/local-track/burn-uri.c	(original)
+++ trunk/src/plugins/local-track/burn-uri.c	Thu Feb 26 20:12:27 2009
@@ -505,22 +505,30 @@
 			       GError **error)
 {
 	BraseroBurnURIPrivate *priv;
+	GError *thread_error = NULL;
 
 	priv = BRASERO_BURN_URI_PRIVATE (self);
 
 	if (priv->thread)
 		return BRASERO_BURN_RUNNING;
 
+	priv->cancel = g_cancellable_new ();
+
 	g_mutex_lock (priv->mutex);
 	priv->thread = g_thread_create (brasero_burn_uri_thread,
 					self,
 					TRUE,
-					error);
+					&thread_error);
 	g_mutex_unlock (priv->mutex);
-	if (!priv->thread) 
+
+	/* Reminder: this is not necessarily an error as the thread may have finished */
+	//if (!priv->thread)
+	//	return BRASERO_BURN_ERR;
+	if (thread_error) {
+		g_propagate_error (error, thread_error);
 		return BRASERO_BURN_ERR;
+	}
 
-	priv->cancel = g_cancellable_new ();
 	return BRASERO_BURN_OK;
 }
 



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