summaryrefslogtreecommitdiff
path: root/src/muc-factory.c
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2012-03-26 17:53:31 -0400
committerJonny Lamb <jonny.lamb@collabora.co.uk>2012-07-20 12:19:13 +0100
commit1b08b38de7166ae229555ff9aecf49278d67a97c (patch)
treec7279ea18fbd86adb7e80512051943657f956a70 /src/muc-factory.c
parent5b5ffc4516a4fe2ef2ac5b0c131ae1b2610de789 (diff)
downloadtelepathy-gabble-1b08b38de7166ae229555ff9aecf49278d67a97c.tar.gz
muc-factory: simplify code to get IM channel from InitialChannels
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'src/muc-factory.c')
-rw-r--r--src/muc-factory.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/muc-factory.c b/src/muc-factory.c
index 6e8e13a32..6fa29a19f 100644
--- a/src/muc-factory.c
+++ b/src/muc-factory.c
@@ -1194,7 +1194,7 @@ handle_text_channel_request (GabbleMucFactory *self,
const char *object_path = g_ptr_array_index (initial_channels, i);
GObject *object;
TpHandle handle;
- GabbleConnection *connection;
+ TpBaseConnection *connection;
object = dbus_g_connection_lookup_g_object (bus, object_path);
@@ -1205,19 +1205,19 @@ handle_text_channel_request (GabbleMucFactory *self,
continue;
}
- g_object_get (object,
- "connection", &connection,
- "handle", &handle,
- NULL);
- g_object_unref (connection); /* drop the ref immediately */
+ connection = tp_base_channel_get_connection (
+ TP_BASE_CHANNEL (object));
- if (connection != priv->conn)
+ if ((GabbleConnection *) connection != priv->conn)
{
DEBUG ("Channel %s is from a different Connection, ignoring",
object_path);
continue;
}
+ handle = tp_base_channel_get_target_handle (
+ TP_BASE_CHANNEL (object));
+
tp_handle_set_add (handles, handle);
tp_intset_add (continue_handles, handle);
g_hash_table_insert (final_channels, (char *) object_path, NULL);