im.pidgin.pidgin: 15fcc72f6db29d572909078a86fb269698314506

markdoliner at markdoliner at
Wed Jan 16 02:40:39 EST 2008

Revision: 15fcc72f6db29d572909078a86fb269698314506
Ancestor: 9df2fc149cf63f4ef4232f57f841a386130e61d1
Author: markdoliner at
Date: 2008-01-16T07:37:29
Branch: im.pidgin.pidgin

Modified files:


Two performance/network bandwidth related changes here, care of meebo.
1. Only auto-fetch stuff for people who are away, because we really
   only want their away message.  This changes oscar to NOT auto-fetch
   people's profile info.  That doesn't matter for Pidgin and I don't
   think it matters for Finch.  If it causes bad things for Adium or
   other things then please let me know.
2. When auto-fetching stuff, only request the away message and not
   the profile info, because we really only want the away message.
   Again, if this causes bad things to happen then please let me know.

-------------- next part --------------
--- libpurple/protocols/oscar/family_buddy.c	7468b58d0d49ff9c0a15c0d1174525dd4db6cf7d
+++ libpurple/protocols/oscar/family_buddy.c	5cc2eddf9c0890a6e44351d358d50b268036aabf
@@ -219,8 +219,9 @@ buddychange(OscarData *od, FlapConnectio
 	if ((userfunc = aim_callhandler(od, snac->family, snac->subtype)))
 		ret = userfunc(od, conn, frame, &userinfo);
-	if (snac->subtype == SNAC_SUBTYPE_BUDDY_ONCOMING)
-		aim_locate_requestuserinfo(od,;
+	if (snac->subtype == SNAC_SUBTYPE_BUDDY_ONCOMING && userinfo.flags & AIM_FLAG_AWAY)
+		aim_locate_autofetch_away_message(od,;
 	return ret;
--- libpurple/protocols/oscar/family_locate.c	f0947a1e1d497e5092cf23d134ed7ead83bdf69c
+++ libpurple/protocols/oscar/family_locate.c	d9fd12a4efeacb5c0c56d54850dd5c970f9e105f
@@ -386,11 +386,11 @@ void
-aim_locate_requestuserinfo(OscarData *od, const char *sn)
+aim_locate_autofetch_away_message(OscarData *od, const char *sn)
 	struct userinfo_node *cur;
-	/* Make sure we haven't already requested info for this buddy */
+	/* Make sure we haven't already made an info request for this buddy */
 	for (cur = od->locate.requested; cur != NULL; cur = cur->next)
 		if (aim_sncmp(sn, cur->sn) == 0)
@@ -401,7 +401,7 @@ aim_locate_requestuserinfo(OscarData *od
 	cur->next = od->locate.requested;
 	od->locate.requested = cur;
-	aim_locate_getinfoshort(od, cur->sn, 0x00000003);
+	aim_locate_getinfoshort(od, cur->sn, 0x00000002);
 aim_userinfo_t *aim_locate_finduserinfo(OscarData *od, const char *sn) {
--- libpurple/protocols/oscar/oscar.h	56e4a06a254de7c1e9128ffe8dea7450d60eb487
+++ libpurple/protocols/oscar/oscar.h	0c3d93c15966713667b84476fc9b56119a394b64
@@ -1074,7 +1074,7 @@ void aim_locate_dorequest(OscarData *od)
 /* 0x000f */ int aim_locate_setinterests(OscarData *od, const char *interest1, const char *interest2, const char *interest3, const char *interest4, const char *interest5, guint16 privacy);
 /* 0x0015 */ int aim_locate_getinfoshort(OscarData *od, const char *sn, guint32 flags);
-void aim_locate_requestuserinfo(OscarData *od, const char *sn);
+void aim_locate_autofetch_away_message(OscarData *od, const char *sn);
 guint32 aim_locate_getcaps(OscarData *od, ByteStream *bs, int len);
 guint32 aim_locate_getcaps_short(OscarData *od, ByteStream *bs, int len);
 void aim_info_free(aim_userinfo_t *);

More information about the Commits mailing list