# HG changeset patch # User Mark Doliner # Date 1135584483 0 # Node ID 09a241749828369182049ada9b67dfdcaed83666 # Parent eb4841fa697ce52fc665bea673ace630a6088d95 [gaim-migrate @ 15006] If we don't get an oscar blist within 30 seconds then request. I'm hoping this will fix the problem where you come back to your computer after having been disconnected overnight and your buddy list is empty. committer: Tailor Script diff -r eb4841fa697c -r 09a241749828 src/protocols/oscar/oscar.c --- a/src/protocols/oscar/oscar.c Mon Dec 26 07:43:41 2005 +0000 +++ b/src/protocols/oscar/oscar.c Mon Dec 26 08:08:03 2005 +0000 @@ -311,6 +311,7 @@ static void oscar_set_info(GaimConnection *gc, const char *info); static void oscar_set_info_and_status(GaimAccount *account, gboolean setinfo, const char *rawinfo, gboolean setstatus, GaimStatus *status); static void oscar_set_extendedstatus(GaimConnection *gc); +static gboolean gaim_ssi_rerequestdata(gpointer data); static void oscar_free_name_data(struct name_data *data) { g_free(data->name); @@ -1884,7 +1885,7 @@ if (od->getinfotimer > 0) gaim_timeout_remove(od->getinfotimer); gaim_prefs_disconnect_by_handle(gc); - + aim_session_kill(od->sess); g_free(od->sess); od->sess = NULL; @@ -5714,12 +5715,16 @@ static int conninitdone_bos(aim_session_t *sess, aim_frame_t *fr, ...) { GaimConnection *gc = sess->aux_data; + OscarData *od = gc->proto_data; aim_reqpersonalinfo(sess, fr->conn); gaim_debug_info("oscar", "ssi: requesting rights and list\n"); aim_ssi_reqrights(sess); aim_ssi_reqdata(sess); + if (od->getblisttimer > 0) + gaim_timeout_remove(od->getblisttimer); + od->getblisttimer = gaim_timeout_add(30000, gaim_ssi_rerequestdata, od->sess); aim_locate_reqrights(sess); aim_buddylist_reqrights(sess, fr->conn); @@ -6835,7 +6840,12 @@ static gboolean gaim_ssi_rerequestdata(gpointer data) { aim_session_t *sess = data; + GaimConnection *gc = sess->aux_data; + OscarData *od = gc->proto_data; + aim_ssi_reqdata(sess); + od->getblisttimer = 0; + return FALSE; } @@ -6854,7 +6864,9 @@ if (reason == 0x0005) { gaim_notify_error(gc, NULL, _("Unable To Retrieve Buddy List"), _("Gaim was temporarily unable to retrieve your buddy list from the AIM servers. Your buddy list is not lost, and will probably become available in a few hours.")); - od->getblisttimer = gaim_timeout_add(300000, gaim_ssi_rerequestdata, od->sess); + if (od->getblisttimer > 0) + gaim_timeout_remove(od->getblisttimer); + od->getblisttimer = gaim_timeout_add(30000, gaim_ssi_rerequestdata, od->sess); } oscar_set_extendedstatus(gc); @@ -6926,6 +6938,11 @@ timestamp = va_arg(ap, fu32_t); va_end(ap); + /* Don't attempt to re-request our buddy list later */ + if (od->getblisttimer != 0) + gaim_timeout_remove(od->getblisttimer); + od->getblisttimer = 0; + gaim_debug_info("oscar", "ssi: syncing local list and server list\n");