[rhythmbox] [ipod] rework playlist delayed actions
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] [ipod] rework playlist delayed actions
- Date: Sat, 2 Oct 2010 11:47:30 +0000 (UTC)
commit d19bfae89d0e82d12280d7ab3301681cf26cc860
Author: Christophe Fergeau <teuf gnome org>
Date: Fri Oct 1 23:18:47 2010 +0200
[ipod] rework playlist delayed actions
Start moving all code handling playlist delayed actions to use
playlist_op instead of having dedicated fields in RbIpodDelayedAction
This will help solve a nasty memory corruption issue when renaming
playlists.
plugins/ipod/rb-ipod-db.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/plugins/ipod/rb-ipod-db.c b/plugins/ipod/rb-ipod-db.c
index 83df41d..a454164 100644
--- a/plugins/ipod/rb-ipod-db.c
+++ b/plugins/ipod/rb-ipod-db.c
@@ -573,12 +573,12 @@ rb_ipod_db_process_delayed_actions (RbIpodDb *ipod_db)
case RB_IPOD_ACTION_ADD_PLAYLIST:
rb_debug ("IPOD_ACTION_ADD_PLAYLIST");
rb_ipod_db_add_playlist_internal (ipod_db,
- action->playlist);
+ action->playlist_op.playlist);
break;
case RB_IPOD_ACTION_REMOVE_PLAYLIST:
rb_debug ("IPOD_ACTION_REMOVE_PLAYLIST");
rb_ipod_db_remove_playlist_internal (ipod_db,
- action->playlist);
+ action->playlist_op.playlist);
break;
case RB_IPOD_ACTION_RENAME_PLAYLIST:
rb_debug ("IPOD_ACTION_RENAME_PLAYLIST");
@@ -645,7 +645,7 @@ rb_ipod_db_queue_add_playlist (RbIpodDb *ipod_db,
rb_debug ("Queueing add playlist action since the iPod database is currently read-only");
action = g_new0 (RbIpodDelayedAction, 1);
action->type = RB_IPOD_ACTION_ADD_PLAYLIST;
- action->playlist = playlist;
+ action->playlist_op.playlist = playlist;
g_queue_push_tail (priv->delayed_actions, action);
}
@@ -660,7 +660,7 @@ rb_ipod_db_queue_remove_playlist (RbIpodDb *ipod_db,
rb_debug ("Queueing remove playlist action since the iPod database is currently read-only");
action = g_new0 (RbIpodDelayedAction, 1);
action->type = RB_IPOD_ACTION_REMOVE_PLAYLIST;
- action->playlist = playlist;
+ action->playlist_op.playlist = playlist;
g_queue_push_tail (priv->delayed_actions, action);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]