aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2006-10-30 23:19:00 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2006-10-30 23:19:00 +0000
commit088b4fa7df37b5bea6880adfa83fcc36d9e7dc6a (patch)
tree2ff5d14a3b933b29c5ee9fae1ed1ab909d72460b
parent46b76d68491e53a7caf7dd5e98efe45927c0af38 (diff)
downloadports-088b4fa7df37b5bea6880adfa83fcc36d9e7dc6a.tar.gz
ports-088b4fa7df37b5bea6880adfa83fcc36d9e7dc6a.zip
Hack around a bug that would almost certainly result in a crash for
any users trying to download or play Podcasts in Rhythmbox. This is a bandaid until the locking code is rewritten upstream. Tested by: ahze flz Reported by: many Approved by: portmgr (implicit)
Notes
Notes: svn path=/head/; revision=175558
-rw-r--r--audio/rhythmbox-devel/Makefile2
-rw-r--r--audio/rhythmbox-devel/files/patch-podcast_rb-podcast-manager.c56
-rw-r--r--audio/rhythmbox/Makefile2
-rw-r--r--audio/rhythmbox/files/patch-podcast_rb-podcast-manager.c56
4 files changed, 114 insertions, 2 deletions
diff --git a/audio/rhythmbox-devel/Makefile b/audio/rhythmbox-devel/Makefile
index d7c190516e21..9d627a851942 100644
--- a/audio/rhythmbox-devel/Makefile
+++ b/audio/rhythmbox-devel/Makefile
@@ -8,7 +8,7 @@
PORTNAME= rhythmbox
PORTVERSION= 0.9.6
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= audio gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/${PORTNAME}/0.9
diff --git a/audio/rhythmbox-devel/files/patch-podcast_rb-podcast-manager.c b/audio/rhythmbox-devel/files/patch-podcast_rb-podcast-manager.c
new file mode 100644
index 000000000000..2b79af214d6a
--- /dev/null
+++ b/audio/rhythmbox-devel/files/patch-podcast_rb-podcast-manager.c
@@ -0,0 +1,56 @@
+--- podcast/rb-podcast-manager.c.orig Sun Sep 24 07:03:53 2006
++++ podcast/rb-podcast-manager.c Fri Oct 27 10:21:17 2006
+@@ -545,10 +545,12 @@ rb_podcast_manager_next_file (RBPodcastM
+ size = g_list_length (pd->priv->download_list);
+ g_mutex_unlock (pd->priv->download_list_mutex);
+
+- if (size > 0)
++ if (size > 0) {
+ rb_podcast_manager_copy_post (pd);
+- else
+ g_mutex_unlock (pd->priv->mutex_job);
++ } else {
++ g_mutex_unlock (pd->priv->mutex_job);
++ }
+ } else {
+ rb_debug ("not start");
+ }
+@@ -635,6 +637,7 @@ rb_podcast_manager_download_file_info_cb
+
+ rb_debug ("got file info results for %s",
+ rhythmdb_entry_get_string (data->entry, RHYTHMDB_PROP_LOCATION));
++ g_mutex_lock (data->pd->priv->mutex_job);
+
+ if (result->result != GNOME_VFS_OK) {
+
+@@ -769,6 +772,7 @@ rb_podcast_manager_abort_download (RBPod
+ mgr->priv->download_list = g_list_remove (mgr->priv->download_list, (gconstpointer) data);
+ g_mutex_unlock (mgr->priv->download_list_mutex);
+
++ g_mutex_unlock (data->mutex_working);
+ download_info_free (data);
+
+ g_mutex_unlock (mgr->priv->mutex_job);
+@@ -1085,6 +1089,10 @@ start_job (RBPodcastManagerInfo *data)
+ (GnomeVFSXferProgressCallback ) download_progress_cb,
+ data);
+
++ g_mutex_unlock (data->mutex_working);
++
++ g_mutex_unlock (data->pd->priv->mutex_job);
++
+ }
+
+ void
+@@ -1170,6 +1178,11 @@ download_progress_cb (GnomeVFSXferProgre
+
+ if (data == NULL) {
+ return GNOME_VFS_XFER_ERROR_ACTION_ABORT;
++ }
++
++ if (info->phase == GNOME_VFS_XFER_PHASE_INITIAL) {
++ g_mutex_lock (data->mutex_working);
++ g_mutex_lock (data->pd->priv->mutex_job);
+ }
+
+ if (info->status != GNOME_VFS_XFER_PROGRESS_STATUS_OK ||
diff --git a/audio/rhythmbox/Makefile b/audio/rhythmbox/Makefile
index d7c190516e21..9d627a851942 100644
--- a/audio/rhythmbox/Makefile
+++ b/audio/rhythmbox/Makefile
@@ -8,7 +8,7 @@
PORTNAME= rhythmbox
PORTVERSION= 0.9.6
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= audio gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/${PORTNAME}/0.9
diff --git a/audio/rhythmbox/files/patch-podcast_rb-podcast-manager.c b/audio/rhythmbox/files/patch-podcast_rb-podcast-manager.c
new file mode 100644
index 000000000000..2b79af214d6a
--- /dev/null
+++ b/audio/rhythmbox/files/patch-podcast_rb-podcast-manager.c
@@ -0,0 +1,56 @@
+--- podcast/rb-podcast-manager.c.orig Sun Sep 24 07:03:53 2006
++++ podcast/rb-podcast-manager.c Fri Oct 27 10:21:17 2006
+@@ -545,10 +545,12 @@ rb_podcast_manager_next_file (RBPodcastM
+ size = g_list_length (pd->priv->download_list);
+ g_mutex_unlock (pd->priv->download_list_mutex);
+
+- if (size > 0)
++ if (size > 0) {
+ rb_podcast_manager_copy_post (pd);
+- else
+ g_mutex_unlock (pd->priv->mutex_job);
++ } else {
++ g_mutex_unlock (pd->priv->mutex_job);
++ }
+ } else {
+ rb_debug ("not start");
+ }
+@@ -635,6 +637,7 @@ rb_podcast_manager_download_file_info_cb
+
+ rb_debug ("got file info results for %s",
+ rhythmdb_entry_get_string (data->entry, RHYTHMDB_PROP_LOCATION));
++ g_mutex_lock (data->pd->priv->mutex_job);
+
+ if (result->result != GNOME_VFS_OK) {
+
+@@ -769,6 +772,7 @@ rb_podcast_manager_abort_download (RBPod
+ mgr->priv->download_list = g_list_remove (mgr->priv->download_list, (gconstpointer) data);
+ g_mutex_unlock (mgr->priv->download_list_mutex);
+
++ g_mutex_unlock (data->mutex_working);
+ download_info_free (data);
+
+ g_mutex_unlock (mgr->priv->mutex_job);
+@@ -1085,6 +1089,10 @@ start_job (RBPodcastManagerInfo *data)
+ (GnomeVFSXferProgressCallback ) download_progress_cb,
+ data);
+
++ g_mutex_unlock (data->mutex_working);
++
++ g_mutex_unlock (data->pd->priv->mutex_job);
++
+ }
+
+ void
+@@ -1170,6 +1178,11 @@ download_progress_cb (GnomeVFSXferProgre
+
+ if (data == NULL) {
+ return GNOME_VFS_XFER_ERROR_ACTION_ABORT;
++ }
++
++ if (info->phase == GNOME_VFS_XFER_PHASE_INITIAL) {
++ g_mutex_lock (data->mutex_working);
++ g_mutex_lock (data->pd->priv->mutex_job);
+ }
+
+ if (info->status != GNOME_VFS_XFER_PROGRESS_STATUS_OK ||