# HG changeset patch # User Mark Doliner # Date 1048004491 0 # Node ID a68d04b268cebb0e16c77d5f5bdf77e402f46c9e # Parent bfabc4a26fce76a3026560d514089258b9428a72 [gaim-migrate @ 5146] This is kind of an ugly way to make sure we only have one icon connection. I still don't really like the whole process of connecting to a new server in the oscar prpl. It should be more automatic, and have more code resuse. Bleh. Lawrence of Arabia, British Beatlemania committer: Tailor Script diff -r bfabc4a26fce -r a68d04b268ce src/protocols/oscar/oscar.c --- a/src/protocols/oscar/oscar.c Tue Mar 18 13:24:20 2003 +0000 +++ b/src/protocols/oscar/oscar.c Tue Mar 18 16:21:31 2003 +0000 @@ -1532,14 +1532,15 @@ /* Hrmph. I don't know how to make this look better. --mid */ static int gaim_handle_redirect(aim_session_t *sess, aim_frame_t *fr, ...) { - va_list ap; - struct aim_redirect_data *redir; struct gaim_connection *gc = sess->aux_data; + struct oscar_data *od = gc->proto_data; struct gaim_account *account = gc->account; aim_conn_t *tstconn; int i; char *host; int port; + va_list ap; + struct aim_redirect_data *redir; port = account->proto_opt[USEROPT_AUTHPORT][0] ? atoi(account->proto_opt[USEROPT_AUTHPORT]) : FAIM_LOGIN_PORT, @@ -1638,6 +1639,11 @@ } break; case 0x0010: { /* icon */ + if (od->icopa > 0) + gaim_input_remove(od->icopa); + while ((tstconn = aim_conn_findbygroup(sess, 0x0010))) + aim_conn_kill(sess, &tstconn); + if (!(tstconn = aim_newconn(sess, AIM_CONN_TYPE_ICON, NULL))) { debug_printf("unable to connect to icon server\n"); g_free(host);