[Rhythmbox-devel] Patch for DAAP Plugin

Hi I just upgraded my Fedora installation to FC14 and noticed that
DAAP sharing seemed to be broken for me.  My particular use case is a
forwarded port over SSH to a non-standard DAAP port.  When the DAAP
plugin tires to connect to a non-standard port it seems to be giving
the following error:

(16:54:53) [0x6dd170] [libdmapsharing_debug] rb-daap-plugin.c:688:
Creating new DAAP connection to
(16:54:53) [0x6dd170] [rb_shell_clipboard_set_source_internal]
rb-shell-clipboard.c:354: selected source 0x84f420
(16:54:53) [0x6dd170] [rb_shell_clipboard_sync]
rb-shell-clipboard.c:600: syncing clipboard
(16:54:53) [0x6dd170] [rebuild_playlist_menu]
rb-shell-clipboard.c:1035: rebuilding add-to-playlist menu

(rhythmbox:3768): GLib-GObject-CRITICAL **: g_object_unref: assertion
`G_IS_OBJECT (object)' failed
(16:54:53) [0x6dd170] [rb_shell_player_set_source_internal]
rb-shell-player.c:1111: selected source 0x84f420
(16:54:53) [0x6dd170] [rb_shell_player_sync_with_selected_source]
rb-shell-player.c:3443: syncing with selected source: 0x84f420
(16:54:53) [0x6dd170] [rb_shell_player_sync_with_selected_source]
rb-shell-player.c:3446: no playing source, new source is 0x84f420
(16:54:53) [0x6dd170] [rb_shell_player_sync_with_source]
rb-shell-player.c:2969: playing source: (nil), active entry: (nil)
(16:54:53) [0x6dd170] [rb_shell_set_window_title] rb-shell.c:2222:
clearing title
(16:54:53) [0x6dd170] [show_controls] rb-visualizer-plugin.c:852:
showing controls
(16:54:53) [0x6dd170] [rb_shell_player_get_playing_song_duration]
rb-shell-player.c:3429: Did not get playing entry : return -1 as
(16:54:53) [0x6dd170] [rb_shell_player_sync_buttons]
rb-shell-player.c:3064: syncing with source 0x84f420
(16:54:53) [0x6dd170] [prev_action_sensitive_cb]
rb-mpris-plugin.c:1269: emitting CanGoPrevious change
(16:54:53) [0x6dd170] [next_action_sensitive_cb]
rb-mpris-plugin.c:1260: emitting CanGoNext change
(16:54:53) [0x6dd170] [rb_source_header_set_source_internal]
rb-source-header.c:501: selected source 0x84f420
(16:54:53) [0x6dd170] [rb_statusbar_set_property] rb-statusbar.c:341:
selected page 0x84f420
(16:54:53) [0x6dd170] [rb_statusbar_sync_status] rb-statusbar.c:469:
updating status with: '0 songs', '', 999.000000
(16:54:53) [0x6dd170] [shell_selected_page_notify_cb]
rb-disc-recorder-plugin.c:657: RBDiscRecorderPlugin selected page
(16:54:53) [0x6dd170] [paned_size_allocate_cb] rb-shell.c:2919: paned
position 223
(16:54:53) [0x6dd170] [paned_size_allocate_cb] rb-shell.c:2920:
right_paned position 400
(16:54:53) [0x6dd170] [libdmapsharing_debug] rb-daap-plugin.c:688:
Doing something for state: 0
(16:54:53) [0x6dd170] [libdmapsharing_debug] rb-daap-plugin.c:688:
Getting DAAP server info
(16:54:53) [0x6dd170] [libdmapsharing_debug] rb-daap-plugin.c:688:
Queued message for
(16:54:53) [0x6dd170] [libdmapsharing_debug] rb-daap-plugin.c:688:
Received response from http://[]:4000/server-info: 2,
Cannot resolve hostname (

(16:54:53) [0x6dd170] [libdmapsharing_debug] rb-daap-plugin.c:688:
Error getting http://[]:4000/server-info: 2, Cannot
resolve hostname (

(16:54:53) [0x6dd170] [libdmapsharing_debug] rb-daap-plugin.c:688:
Transitioning to next state from 0
(16:54:53) [0x6dd170] [libdmapsharing_debug] rb-daap-plugin.c:688:
Doing something for state: 9
(16:54:53) [0x6dd170] [libdmapsharing_debug] rb-daap-plugin.c:688: DAAP done
(16:54:53) [0x6dd170] [libdmapsharing_debug] rb-daap-plugin.c:688: DAAP finish
(16:54:53) [0x6dd170] [libdmapsharing_debug] rb-daap-plugin.c:688:
Emitting operation done
(16:54:53) [0x6dd170] [libdmapsharing_debug] rb-daap-plugin.c:688:
Connected callback
(16:54:53) [0x6dd170] [rb_daap_source_connection_cb]
rb-daap-source.c:565: Connection callback result: failure
(16:54:53) [0x6dd170] [release_connection] rb-daap-source.c:542:
Releasing connection
(16:54:53) [0x6dd170] [libdmapsharing_debug] rb-daap-plugin.c:688:
DAAP connection dispose
(16:54:53) [0x6dd170] [libdmapsharing_debug] rb-daap-plugin.c:688:
Aborting all pending requests
(16:54:53) [0x6dd170] [libdmapsharing_debug] rb-daap-plugin.c:688: Finalize

The main issue seems to be the url with the port specified twice for
the DAAP share "http://[]:4000/server-info";.  Here's a
patch that *should* fix the issue:

diff --git a/plugins/daap/rb-daap-plugin.c b/plugins/daap/rb-daap-plugin.c
index 20cc539..fc72ac0 100644
--- a/plugins/daap/rb-daap-plugin.c
+++ b/plugins/daap/rb-daap-plugin.c
@@ -646,6 +646,7 @@ new_daap_share_location_added_cb (RBURIDialog *dialog,
        host = g_strdup (location);
        p = strrchr (host, ':');
        if (p != NULL) {
+               host = g_strndup (location, p);
                port = strtoul (p+1, NULL, 10);
                *p = '\0';

Let me know if this is incorrect or if there's something else I can do
to help!  I don't have a full build environment setup yet, but if you
need me to test, I can verify at a later point.

Thanks so much for your awesome work!
///Stephen - http://sdh.skarilla.com

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