changeset 2515:3ec36a342496

[gaim-migrate @ 2528] this is better, hopefully. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Tue, 16 Oct 2001 18:11:15 +0000
parents 6fffd664b78a
children d379814be59e
files src/protocols/icq/gaim_icq.c
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/icq/gaim_icq.c	Tue Oct 16 01:12:36 2001 +0000
+++ b/src/protocols/icq/gaim_icq.c	Tue Oct 16 18:11:15 2001 +0000
@@ -18,6 +18,7 @@
 struct icq_data {
 	icq_Link *link;
 	int cur_status;
+	gboolean connected;
 };
 
 static guint ack_timer = 0;
@@ -79,8 +80,8 @@
 	struct gaim_connection *gc = link->icq_UserData;
 	struct icq_data *id = (struct icq_data *)gc->proto_data;
 	debug_printf("%s is now online.\n", gc->username);
+	id->connected = TRUE;
 	account_online(gc);
-	/*gc->options |= OPT_USR_KEEPALV; this is always-on now */
 	serv_finish_login(gc);
 
 	icq_ChangeStatus(id->link, STATUS_ONLINE);
@@ -90,6 +91,12 @@
 	struct gaim_connection *gc = link->icq_UserData;
 	struct icq_data *id = (struct icq_data *)gc->proto_data;
 
+	if (!id->connected) {
+		hide_login_progress(gc, "Unable to connect");
+		signoff(gc);
+		return;
+	}
+
 	if (icq_Connect(link, "icq.mirabilis.com", 4000) < 1) {
 		hide_login_progress(gc, "Unable to connect");
 		signoff(gc);