comparison libpurple/protocols/oscar/oscar.c @ 28758:3161c687d7bc

Don't call aim_src_clientready() until we have activated our feedbag (and also until after we have our bos rights, but I'm not sure if that matters). This fixes the bug where AIM block lists recently stopped working. I imagine AIM permit lists were also broken, as well as the three ICQ privacy lists. It's conceivable that this will also fix the bug where your contact list is sometimes empty, but I have no evidence to support that either way. This change will be in the next release of Pidgin, 2.6.3, which will probably be released within the next week. Thanks to AOL for telling me what we were doing wrong. Fixes #10489 Fixes #10499 Fixes #10509 Refs #10411
author Mark Doliner <mark@kingant.net>
date Thu, 15 Oct 2009 23:42:27 +0000
parents 3b820f5d7d6a
children 75aab8587e90 63881771e1bf
comparison
equal deleted inserted replaced
28755:d5ff2cd6064a 28758:3161c687d7bc
3907 "BOS rights: Max permit = %hu / Max deny = %hu\n", maxpermits, maxdenies); 3907 "BOS rights: Max permit = %hu / Max deny = %hu\n", maxpermits, maxdenies);
3908 3908
3909 od->rights.maxpermits = (guint)maxpermits; 3909 od->rights.maxpermits = (guint)maxpermits;
3910 od->rights.maxdenies = (guint)maxdenies; 3910 od->rights.maxdenies = (guint)maxdenies;
3911 3911
3912 purple_connection_set_state(gc, PURPLE_CONNECTED);
3913
3914 purple_debug_info("oscar", "buddy list loaded\n"); 3912 purple_debug_info("oscar", "buddy list loaded\n");
3915
3916 aim_srv_clientready(od, conn);
3917 3913
3918 if (purple_account_get_user_info(account) != NULL) 3914 if (purple_account_get_user_info(account) != NULL)
3919 serv_set_info(gc, purple_account_get_user_info(account)); 3915 serv_set_info(gc, purple_account_get_user_info(account));
3920 3916
3921 username = purple_account_get_username(account); 3917 username = purple_account_get_username(account);
3954 purple_account_get_bool(account, "web_aware", OSCAR_DEFAULT_WEB_AWARE)); 3950 purple_account_get_bool(account, "web_aware", OSCAR_DEFAULT_WEB_AWARE));
3955 } 3951 }
3956 3952
3957 aim_srv_requestnew(od, SNAC_FAMILY_ALERT); 3953 aim_srv_requestnew(od, SNAC_FAMILY_ALERT);
3958 aim_srv_requestnew(od, SNAC_FAMILY_CHATNAV); 3954 aim_srv_requestnew(od, SNAC_FAMILY_CHATNAV);
3955
3956 od->bos.have_rights = TRUE;
3957
3958 /*
3959 * If we've already received our feedbag data then we're not waiting on
3960 * anything else, so send the server clientready.
3961 *
3962 * Normally we get bos rights before we get our feedbag data, so this
3963 * rarely (never?) happens. And I'm not sure it actually matters if we
3964 * wait for bos rights before calling clientready. But it seems safer
3965 * to do it this way.
3966 */
3967 if (od->ssi.received_data) {
3968 aim_srv_clientready(od, conn);
3969 purple_connection_set_state(gc, PURPLE_CONNECTED);
3970 }
3959 3971
3960 return 1; 3972 return 1;
3961 } 3973 }
3962 3974
3963 #ifdef OLDSTYLE_ICQ_OFFLINEMSGS 3975 #ifdef OLDSTYLE_ICQ_OFFLINEMSGS
5394 */ 5406 */
5395 img = purple_buddy_icons_find_account_icon(account); 5407 img = purple_buddy_icons_find_account_icon(account);
5396 oscar_set_icon(gc, img); 5408 oscar_set_icon(gc, img);
5397 purple_imgstore_unref(img); 5409 purple_imgstore_unref(img);
5398 5410
5411 /*
5412 * If we've already received our bos rights then we're not waiting on
5413 * anything else, so send the server clientready.
5414 */
5415 if (od->bos.have_rights) {
5416 aim_srv_clientready(od, conn);
5417 purple_connection_set_state(gc, PURPLE_CONNECTED);
5418 }
5419
5399 return 1; 5420 return 1;
5400 } 5421 }
5401 5422
5402 static int purple_ssi_parseack(OscarData *od, FlapConnection *conn, FlapFrame *fr, ...) { 5423 static int purple_ssi_parseack(OscarData *od, FlapConnection *conn, FlapFrame *fr, ...) {
5403 PurpleConnection *gc = od->gc; 5424 PurpleConnection *gc = od->gc;