brasero r1496 - in trunk: . src
- From: philippr svn gnome org
- To: svn-commits-list gnome org
- Subject: brasero r1496 - in trunk: . src
- Date: Sat, 8 Nov 2008 16:58:29 +0000 (UTC)
Author: philippr
Date: Sat Nov 8 16:58:29 2008
New Revision: 1496
URL: http://svn.gnome.org/viewvc/brasero?rev=1496&view=rev
Log:
Fix some problem when cancelling job (crash) or progress report (not
used so unnoticeable), also happened when we tried to give a higher
priority to jobs
* src/brasero-data-disc.c (brasero_data_disc_session_available_cb):
* src/brasero-io.c (brasero_io_job_progress_report_cb),
(brasero_io_job_free), (brasero_io_cancel_tasks_by_data_cb),
(brasero_io_compare_unprocessed_task),
(brasero_io_free_async_queue):
* src/brasero-project.c (brasero_project_open_project):
Modified:
trunk/ChangeLog
trunk/src/brasero-io.c
Modified: trunk/src/brasero-io.c
==============================================================================
--- trunk/src/brasero-io.c (original)
+++ trunk/src/brasero-io.c Sat Nov 8 16:58:29 2008
@@ -145,14 +145,19 @@
g_mutex_lock (priv->lock);
for (iter = priv->progress; iter; iter = iter->next) {
BraseroIOJobProgress *progress;
+ gpointer callback_data;
progress = iter->data;
+ callback_data = progress->job->callback_data?
+ progress->job->callback_data->callback_data:
+ NULL;
+
/* update our progress */
progress->progress (progress->job, progress);
progress->job->base->progress (progress->job->base->object,
progress,
- progress->job->callback_data);
+ callback_data);
}
g_mutex_unlock (priv->lock);
@@ -445,9 +450,11 @@
* add a dummy result to destroy callback_data. */
if (g_atomic_int_dec_and_test (&job->callback_data->ref)) {
if (cancelled) {
- job->base->destroy (job->base->object,
- TRUE,
- job->callback_data);
+ if (job->base->destroy)
+ job->base->destroy (job->base->object,
+ TRUE,
+ job->callback_data->callback_data);
+
g_free (job->callback_data);
}
else
@@ -2560,7 +2567,7 @@
{
BraseroIOJob *job = callback_data;
- if (job->callback_data != user_data)
+ if (job->callback_data && job->callback_data->callback_data != user_data)
return FALSE;
return TRUE;
@@ -2616,7 +2623,10 @@
if (job->base == data->base)
return FALSE;
- return data->func (job->callback_data, data->user_data);
+ if (!job->callback_data)
+ return FALSE;
+
+ return data->func (job->callback_data->callback_data, data->user_data);
}
void
@@ -2680,11 +2690,6 @@
{
BraseroIOJob *job = callback_data;
- if (job->base->destroy)
- job->base->destroy (job->base->object,
- TRUE,
- job->callback_data);
-
brasero_io_job_free (BRASERO_IO (manager), TRUE, job);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]