diff libpurple/protocols/qq/login_logout.c @ 20125:3e8531514ad7

Add disconnection reasons to qq.
author Will Thompson <will.thompson@collabora.co.uk>
date Tue, 02 Oct 2007 00:14:12 +0000
parents 44b4e8bd759b
children f3cfcbbac3d8
line wrap: on
line diff
--- a/libpurple/protocols/qq/login_logout.c	Mon Oct 01 16:07:14 2007 +0000
+++ b/libpurple/protocols/qq/login_logout.c	Tue Oct 02 00:14:12 2007 +0000
@@ -405,7 +405,7 @@
 				">>> %d bytes -> [default] decrypt and dump\n%s",
 				buf_len, hex_dump);
 		try_dump_as_gbk(buf, buf_len);
-		purple_connection_error(gc, _("Error requesting login token"));
+		purple_connection_error_reason(gc, PURPLE_REASON_NETWORK_ERROR, _("Error requesting login token"));
 	}
 	g_free(hex_dump);
 }
@@ -480,10 +480,12 @@
 	switch (ret) {
 	case QQ_LOGIN_REPLY_PWD_ERROR:
 		gc->wants_to_die = TRUE;
-		purple_connection_error(gc, _("Incorrect password."));
+		purple_connection_error_reason(gc,
+			PURPLE_REASON_AUTHENTICATION_FAILED, _("Incorrect password."));
 		break;
 	case QQ_LOGIN_REPLY_MISC_ERROR:
-		purple_connection_error(gc, _("Unable to login, check debug log"));
+		purple_connection_error_reason(gc,
+			PURPLE_REASON_NETWORK_ERROR, _("Unable to login, check debug log"));
 		break;
 	case QQ_LOGIN_REPLY_OK:
 		purple_debug(PURPLE_DEBUG_INFO, "QQ", "Login replys OK, everything is fine\n");