diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2009-01-07 00:50:11 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2009-01-07 00:50:11 +0800 |
commit | bef276f342edd95e1fd7d1fd7b6d8ed3360f6159 (patch) | |
tree | 0dad7794cbbae631934b5d5a92aca692f8e844cf | |
parent | 542d9fc9c63dab14081354c889a3d83cb942fc8c (diff) | |
download | gsoc2013-empathy-bef276f342edd95e1fd7d1fd7b6d8ed3360f6159.tar gsoc2013-empathy-bef276f342edd95e1fd7d1fd7b6d8ed3360f6159.tar.gz gsoc2013-empathy-bef276f342edd95e1fd7d1fd7b6d8ed3360f6159.tar.bz2 gsoc2013-empathy-bef276f342edd95e1fd7d1fd7b6d8ed3360f6159.tar.lz gsoc2013-empathy-bef276f342edd95e1fd7d1fd7b6d8ed3360f6159.tar.xz gsoc2013-empathy-bef276f342edd95e1fd7d1fd7b6d8ed3360f6159.tar.zst gsoc2013-empathy-bef276f342edd95e1fd7d1fd7b6d8ed3360f6159.zip |
Fix the creation of bus_name and object_path for dispatching tubes. It drops escaping for now.
svn path=/trunk/; revision=2104
-rw-r--r-- | libempathy/empathy-tube-handler.c | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/libempathy/empathy-tube-handler.c b/libempathy/empathy-tube-handler.c index 146fe79ff..6131fa948 100644 --- a/libempathy/empathy-tube-handler.c +++ b/libempathy/empathy-tube-handler.c @@ -190,7 +190,6 @@ OUT: gchar * empathy_tube_handler_build_bus_name (TpTubeType type, const gchar *service) { - gchar *service_escaped; gchar *str = NULL; const gchar *prefix = NULL; @@ -198,15 +197,13 @@ empathy_tube_handler_build_bus_name (TpTubeType type, const gchar *service) g_return_val_if_fail (service != NULL, NULL); if (type == TP_TUBE_TYPE_DBUS) - prefix = "org.gnome.Empathy.DTubeHandler.%s"; + prefix = "org.gnome.Empathy.DTubeHandler."; else if (type == TP_TUBE_TYPE_STREAM) - prefix = "org.gnome.Empathy.StreamTubeHandler.%s"; + prefix = "org.gnome.Empathy.StreamTubeHandler."; else g_return_val_if_reached (NULL); - service_escaped = tp_escape_as_identifier (service); - str = g_strdup_printf (prefix, service_escaped); - g_free (service_escaped); + str = g_strconcat (prefix, service, NULL); return str; } @@ -214,23 +211,15 @@ empathy_tube_handler_build_bus_name (TpTubeType type, const gchar *service) gchar * empathy_tube_handler_build_object_path (TpTubeType type, const gchar *service) { - gchar *service_escaped; - gchar *str = NULL; - const gchar *prefix = NULL; + gchar *bus_name; + gchar *str; g_return_val_if_fail (type <= TP_TUBE_TYPE_STREAM, NULL); g_return_val_if_fail (service != NULL, NULL); - if (type == TP_TUBE_TYPE_DBUS) - prefix = "/org/gnome/Empathy/DTubeHandler/%s"; - else if (type == TP_TUBE_TYPE_STREAM) - prefix = "/org/gnome/Empathy/StreamTubeHandler/%s"; - else - g_return_val_if_reached (NULL); - - service_escaped = tp_escape_as_identifier (service); - str = g_strdup_printf (prefix, service_escaped); - g_free (service_escaped); + bus_name = empathy_tube_handler_build_bus_name (type, service); + str = g_strdelimit (g_strdup_printf ("/%s", bus_name), ".", '/'); + g_free (bus_name); return str; } |