cpw.darkrain42.buddy-add: cdf242cb: Properly don't re-add buddies in SILC

paul at darkrain42.org paul at darkrain42.org
Sat Jan 17 17:57:23 EST 2009


-----------------------------------------------------------------
Revision: cdf242cb346bc741802d3a2bfede51cfd8e41866
Ancestor: 3f343f00feee4b706c513b7dc6940ce2fe0150d8
Author: paul at darkrain42.org
Date: 2008-12-21T22:11:46
Branch: im.pidgin.cpw.darkrain42.buddy-add
URL: http://d.pidgin.im/viewmtn/revision/info/cdf242cb346bc741802d3a2bfede51cfd8e41866

Modified files:
        libpurple/protocols/silc/buddy.c
        libpurple/protocols/silc10/buddy.c

ChangeLog: 

Properly don't re-add buddies in SILC

-------------- next part --------------
============================================================
--- libpurple/protocols/silc/buddy.c	7a08c648fb7c5adfe6f6569338d2fec65e1cc5de
+++ libpurple/protocols/silc/buddy.c	ae0d01e900cff1ab146eb07ea960db8d6859eff0
@@ -1390,7 +1390,12 @@ void silcpurple_add_buddy(PurpleConnecti
 
 void silcpurple_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group)
 {
-	silcpurple_add_buddy_i(gc, buddy, FALSE);
+	/* Don't add if the buddy is already on the list.
+	 *
+	 * SILC doesn't have groups, so we also don't need to do anything
+	 * for a move. */
+	if (buddy->proto_data == NULL)
+		silcpurple_add_buddy_i(gc, buddy, FALSE);
 }
 
 void silcpurple_send_buddylist(PurpleConnection *gc)
============================================================
--- libpurple/protocols/silc10/buddy.c	5bde4815ce5af331312f85c7a0d1f275ff9e0e11
+++ libpurple/protocols/silc10/buddy.c	8ab19b00c9821a6572b3ac40e637854b4ad111dd
@@ -1390,7 +1390,12 @@ void silcpurple_add_buddy(PurpleConnecti
 
 void silcpurple_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group)
 {
-	silcpurple_add_buddy_i(gc, buddy, FALSE);
+	/* Don't add if the buddy is already on the list.
+	 *
+	 * SILC doesn't have groups, so we don't need to do anything
+	 * for a move. */
+	if (buddy->proto_data == NULL)
+		silcpurple_add_buddy_i(gc, buddy, FALSE);
 }
 
 void silcpurple_send_buddylist(PurpleConnection *gc)


More information about the Commits mailing list