brasero r970 - in trunk: . src src/plugins/libburnia



Author: philippr
Date: Thu Jul 10 13:30:47 2008
New Revision: 970
URL: http://svn.gnome.org/viewvc/brasero?rev=970&view=rev

Log:
	Fix for #538872 â Brasero crashes with libburn backend
	Fix a crash when libburn runs into an error
	Improved error reporting

	* src/burn-job.c (brasero_job_set_dangerous):
	* src/plugins/libburnia/burn-libburn-common.c
	(brasero_libburn_common_process_message):
	* src/plugins/libburnia/burn-libburn.c
	(brasero_libburn_clock_tick):

Modified:
   trunk/ChangeLog
   trunk/src/burn-job.c
   trunk/src/plugins/libburnia/burn-libburn-common.c
   trunk/src/plugins/libburnia/burn-libburn.c

Modified: trunk/src/burn-job.c
==============================================================================
--- trunk/src/burn-job.c	(original)
+++ trunk/src/burn-job.c	Thu Jul 10 13:30:47 2008
@@ -1804,7 +1804,8 @@
 	BRASERO_JOB_DEBUG (self);
 
 	priv = BRASERO_JOB_PRIVATE (self);
-	brasero_task_ctx_set_dangerous (priv->ctx, value);
+	if (priv->ctx)
+		brasero_task_ctx_set_dangerous (priv->ctx, value);
 }
 
 /**

Modified: trunk/src/plugins/libburnia/burn-libburn-common.c
==============================================================================
--- trunk/src/plugins/libburnia/burn-libburn-common.c	(original)
+++ trunk/src/plugins/libburnia/burn-libburn-common.c	Thu Jul 10 13:30:47 2008
@@ -148,27 +148,21 @@
 	char err_sev [80];
 	char err_txt [BURN_MSGS_MESSAGE_LEN] = {0};
 
+	/* Get all the FATAL messages, indicating an error */
 	ret = burn_msgs_obtain ("FATAL",
 				&err_code,
 				err_txt,
 				&err_errno,
 				err_sev);
-
 	if (ret == 0)
 	        return TRUE;
 
-	if (ret < 0) {
-		error = g_error_new (BRASERO_BURN_ERROR,
-				     BRASERO_BURN_ERROR_GENERAL,
-				     err_txt);
-		brasero_job_error (BRASERO_JOB (self), error);
-		return FALSE;
-	}
-
-	BRASERO_JOB_LOG (self,
-			 _("(%s) libburn tried to say something"),
-		         err_txt);
-	return TRUE;
+	BRASERO_JOB_LOG (self, "Libburn reported an error %s", err_txt);
+	error = g_error_new (BRASERO_BURN_ERROR,
+			     BRASERO_BURN_ERROR_GENERAL,
+			     err_txt);
+	brasero_job_error (BRASERO_JOB (self), error);
+	return FALSE;
 }
 
 static gboolean

Modified: trunk/src/plugins/libburnia/burn-libburn.c
==============================================================================
--- trunk/src/plugins/libburnia/burn-libburn.c	(original)
+++ trunk/src/plugins/libburnia/burn-libburn.c	Thu Jul 10 13:30:47 2008
@@ -723,6 +723,7 @@
 				   g_error_new (BRASERO_BURN_ERROR,
 						BRASERO_BURN_ERROR_GENERAL,
 						_("an unknown error occured")));
+		return BRASERO_BURN_OK;
 	}
 
 	/* That's finished */



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