[Telepathy-commits] [telepathy-gabble/master] add_buddies_to_view_from_node: early return if there isn't buddy to add
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Fri Sep 26 10:02:24 PDT 2008
20080630125553-7fe3f-88c2abff6de6d9ec421b7f6206562c08d601fd5b.gz
---
src/conn-olpc.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/conn-olpc.c b/src/conn-olpc.c
index 336bc69..701e83e 100644
--- a/src/conn-olpc.c
+++ b/src/conn-olpc.c
@@ -3261,6 +3261,13 @@ add_buddies_to_view_from_node (GabbleConnection *conn,
return FALSE;
}
+ if (buddies->len == 0)
+ {
+ g_array_free (buddies, TRUE);
+ g_ptr_array_free (buddies_properties, TRUE);
+ return TRUE;
+ }
+
gabble_olpc_view_add_buddies (view, buddies, buddies_properties, 0);
for (i = 0; i < buddies->len; i++)
@@ -3553,7 +3560,6 @@ conn_olpc_msg_cb (LmMessageHandler *handler,
{
activity_membership_change (conn, node);
}
- /* TODO: join, left and closed announcements */
}
return LM_HANDLER_RESULT_REMOVE_MESSAGE;
--
1.5.6.5
More information about the Telepathy-commits
mailing list