From 495af066b8e5057cd4846d38c7de5e94abfaadc2 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 25 Sep 2013 12:07:34 +0200 Subject: [PATCH 3/5] stop accessing TpProxy members directly https://bugs.freedesktop.org/show_bug.cgi?id=69802 --- telepathy-farstream/channel.c | 7 ++----- telepathy-farstream/media-signalling-channel.c | 12 ++++++------ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/telepathy-farstream/channel.c b/telepathy-farstream/channel.c index 5e651f3..3442f70 100644 --- a/telepathy-farstream/channel.c +++ b/telepathy-farstream/channel.c @@ -139,11 +139,8 @@ tf_channel_get_property (GObject *object, g_value_set_object (value, self->priv->channel_proxy); break; case PROP_OBJECT_PATH: - { - TpProxy *as_proxy = (TpProxy *) self->priv->channel_proxy; - - g_value_set_string (value, as_proxy->object_path); - } + g_value_set_string (value, + tp_proxy_get_object_path (self->priv->channel_proxy)); break; case PROP_FS_CONFERENCES: if (self->priv->call_channel) diff --git a/telepathy-farstream/media-signalling-channel.c b/telepathy-farstream/media-signalling-channel.c index 52db185..2f7b2f7 100644 --- a/telepathy-farstream/media-signalling-channel.c +++ b/telepathy-farstream/media-signalling-channel.c @@ -425,12 +425,12 @@ new_stream_cb (TfSession *session, TfStream *stream; FsConference *fs_conference; FsParticipant *fs_participant; - TpProxy *channel_as_proxy = (TpProxy *) self->channel_proxy; TpMediaStreamHandler *proxy; GList *local_codec_config = NULL; - proxy = tp_media_stream_handler_new (channel_as_proxy->dbus_daemon, - channel_as_proxy->bus_name, object_path, NULL); + proxy = tp_media_stream_handler_new ( + tp_proxy_get_dbus_daemon (self->channel_proxy), + tp_proxy_get_bus_name (self->channel_proxy), object_path, NULL); if (proxy == NULL) { @@ -503,7 +503,6 @@ add_session (TfMediaSignallingChannel *self, const gchar *session_type) { GError *error = NULL; - TpProxy *channel_as_proxy = (TpProxy *) self->channel_proxy; TpMediaSessionHandler *proxy; FsConference *conf = NULL; @@ -511,8 +510,9 @@ add_session (TfMediaSignallingChannel *self, g_assert (self->session == NULL); - proxy = tp_media_session_handler_new (channel_as_proxy->dbus_daemon, - channel_as_proxy->bus_name, object_path, &error); + proxy = tp_media_session_handler_new ( + tp_proxy_get_dbus_daemon (self->channel_proxy), + tp_proxy_get_bus_name (self->channel_proxy), object_path, &error); if (proxy == NULL) { -- 1.8.3.1