changeset 1747:0763e0d4addd

[gaim-migrate @ 1757] whistle while you work *wh wh wh wh wh wh wh* I forget how the rest of the song goes. I owe, I owe, so off to work I go. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 25 Apr 2001 06:32:00 +0000
parents bacb77b0eb06
children 2eec724fdbcd
files src/oscar.c
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/oscar.c	Wed Apr 25 01:53:56 2001 +0000
+++ b/src/oscar.c	Wed Apr 25 06:32:00 2001 +0000
@@ -618,7 +618,7 @@
 {
 	struct pieceofcrap *pos = data;
 	struct oscar_data *od = pos->gc->proto_data;
-	char in;
+	char in = '\0';
 	int x = 0;
 	char m[17];
 	if (c == GDK_INPUT_WRITE) {
@@ -642,6 +642,16 @@
 			x = 0;
 		if (x == 2)
 			break;
+		in = '\0';
+	}
+	if (in != '\n') {
+		do_error_dialog("Gaim was unable to get a valid hash for logging into AIM."
+				" You may be disconnected shortly.", "Login Error");
+		gdk_input_remove(pos->inpa);
+		close(pos->conn->fd);
+		aim_conn_kill(od->sess, &pos->conn);
+		g_free(pos);
+		return;
 	}
 	read(pos->conn->fd, m, 16);
 	m[16] = '\0';