pidgin: 1e378726: gadu-gadu: There's no need to set all bu...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Sun May 31 22:30:40 EDT 2009


-----------------------------------------------------------------
Revision: 1e3787263d0d1f22b698aa4b57f1d5605eac9934
Ancestor: 6fc45f1ad29b6531775d10e3d53ea239776b5ef6
Author: darkrain42 at pidgin.im
Date: 2009-06-01T02:28:39
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/1e3787263d0d1f22b698aa4b57f1d5605eac9934

Modified files:
        libpurple/protocols/gg/buddylist.c
        libpurple/protocols/gg/buddylist.h
        libpurple/protocols/gg/gg.c

ChangeLog: 

gadu-gadu: There's no need to set all buddies to offline at logout

Other protocols (well, XMPP and OSCAR) don't do this sort of thing and
the buddies are removed from the buddy list in _purple_connection_destroy.

-------------- next part --------------
============================================================
--- libpurple/protocols/gg/buddylist.c	42cef4deaf17d6e93d737ff74cfc2ad918f222be
+++ libpurple/protocols/gg/buddylist.c	c3e71d332738e059ec9e19ccb4d4b7823ab5987a
@@ -178,55 +178,6 @@ void ggp_buddylist_load(PurpleConnection
 }
 /* }}} */
 
-/* void ggp_buddylist_offline(PurpleConnection *gc) {{{ */
-void ggp_buddylist_offline(PurpleConnection *gc)
-{
-	PurpleAccount *account = purple_connection_get_account(gc);
-	PurpleBlistNode *gnode, *cnode, *bnode;
-	PurpleBuddy *buddy;
-
-	for (gnode = purple_blist_get_root();
-	     gnode != NULL;
-	     gnode = purple_blist_node_get_sibling_next(gnode))
-	{
-		if (!PURPLE_BLIST_NODE_IS_GROUP(gnode))
-			continue;
-
-		for (cnode = purple_blist_node_get_first_child(gnode);
-		     cnode != NULL;
-		     cnode = purple_blist_node_get_sibling_next(cnode))
-		{
-			if (!PURPLE_BLIST_NODE_IS_CONTACT(cnode))
-				continue;
-
-			for (bnode = purple_blist_node_get_first_child(cnode);
-			     bnode != NULL;
-			     bnode = purple_blist_node_get_sibling_next(bnode))
-			{
-				const gchar *name = NULL;
-
-				if (!PURPLE_BLIST_NODE_IS_BUDDY(bnode))
-					continue;
-
-				buddy = (PurpleBuddy *)bnode;
-				
-				name = purple_buddy_get_name(buddy);
-
-				if (purple_buddy_get_account(buddy) != account)
-					continue;
-
-				purple_prpl_got_user_status(
-					account, name, "offline", NULL);
-
-				purple_debug_info("gg",
-					"ggp_buddylist_offline: gone: %s\n",
-					name);
-			}
-		}
-	}
-}
-/* }}} */
-
 /* char *ggp_buddylist_dump(PurpleAccount *account) {{{ */
 char *ggp_buddylist_dump(PurpleAccount *account)
 {
============================================================
--- libpurple/protocols/gg/buddylist.h	f5185f83986a5466132f43423a79d82c602349c2
+++ libpurple/protocols/gg/buddylist.h	822b57ed1dce29c60fc06bc165a12742e21bdd90
@@ -31,7 +31,7 @@ ggp_buddylist_send(PurpleConnection *gc)
 ggp_buddylist_send(PurpleConnection *gc);
 
 /**
- * Load buddylist from server into the rooster.
+ * Load buddylist from server into the roster.
  *
  * @param gc PurpleConnection
  * @param buddylist Pointer to the buddylist that will be loaded.
@@ -41,14 +41,6 @@ ggp_buddylist_load(PurpleConnection *gc,
 ggp_buddylist_load(PurpleConnection *gc, char *buddylist);
 
 /**
- * Set offline status for all buddies.
- *
- * @param gc Connection handler
- */
-void
-ggp_buddylist_offline(PurpleConnection *gc);
-
-/**
  * Get all the buddies in the current account.
  *
  * @param account Current account.
============================================================
--- libpurple/protocols/gg/gg.c	943f6f167939c43dff33656bf75a8240cfbd0783
+++ libpurple/protocols/gg/gg.c	d1ca49f1ab4d2d081e01e1d2a443f66927d322e6
@@ -1837,8 +1837,6 @@ static void ggp_close(PurpleConnection *
 	if (gc->inpa > 0)
 		purple_input_remove(gc->inpa);
 
-	ggp_buddylist_offline(gc);
-
 	purple_debug_info("gg", "Connection closed.\n");
 }
 


More information about the Commits mailing list