From 901577fd23a6e7f7e639be6c8d8b086a3531a091 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Mon, 27 Jun 2011 18:03:36 +0100 Subject: [PATCH 1/3] Remove TpBaseConnection.connected callback. This OLPC-specific function can just be called from the ::status-changed signal handler. I've called it at the end of that function because the 'connected' vfunc is called just after ::status-changed is emitted, so this shouldn't change the order of operations in the OLPC code. Fixes: --- src/conn-olpc.c | 4 +++- src/conn-olpc.h | 2 -- src/connection.c | 9 --------- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/conn-olpc.c b/src/conn-olpc.c index 655a5cc..cac0413 100644 --- a/src/conn-olpc.c +++ b/src/conn-olpc.c @@ -409,7 +409,7 @@ invitees_quark (void) return q; } -void +static void gabble_connection_connected_olpc (GabbleConnection *conn) { GHashTable *preload = g_object_steal_qdata ((GObject *) conn, @@ -2203,6 +2203,8 @@ connection_status_changed_cb (GabbleConnection *conn, DEBUG ("Failed to send PEP activity props reset in response to " "initial connection"); } + + gabble_connection_connected_olpc (conn); } } diff --git a/src/conn-olpc.h b/src/conn-olpc.h index 43be890..11958c4 100644 --- a/src/conn-olpc.h +++ b/src/conn-olpc.h @@ -27,8 +27,6 @@ void olpc_buddy_info_iface_init (gpointer g_iface, gpointer iface_data); -void gabble_connection_connected_olpc (GabbleConnection *conn); - void olpc_activity_properties_iface_init (gpointer g_iface, gpointer iface_data); diff --git a/src/connection.c b/src/connection.c index 3f72bf7..4af9767 100644 --- a/src/connection.c +++ b/src/connection.c @@ -800,14 +800,6 @@ _gabble_connection_create_handle_repos (TpBaseConnection *conn, conn); } -static void -base_connected_cb (TpBaseConnection *base_conn) -{ - GabbleConnection *conn = GABBLE_CONNECTION (base_conn); - - gabble_connection_connected_olpc (conn); -} - #define TWICE(x) (x), (x) static const gchar *implemented_interfaces[] = { @@ -925,7 +917,6 @@ gabble_connection_class_init (GabbleConnectionClass *gabble_connection_class) parent_class->create_channel_factories = NULL; parent_class->create_channel_managers = _gabble_connection_create_channel_managers; - parent_class->connected = base_connected_cb; parent_class->shut_down = connection_shut_down; parent_class->start_connecting = _gabble_connection_connect; parent_class->interfaces_always_present = interfaces_always_present; -- 1.7.5.4