changeset 4821:a68d04b268ce

[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 <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 18 Mar 2003 16:21:31 +0000
parents bfabc4a26fce
children c107020b25ee
files src/protocols/oscar/oscar.c
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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);