im.pidgin.cpw.resiak.disconnectreason: 81b21e5230be75e9359bd28bfb194866f25b1ca9

resiak at soc.pidgin.im resiak at soc.pidgin.im
Wed Oct 3 13:57:14 EDT 2007


revision:            81b21e5230be75e9359bd28bfb194866f25b1ca9
date:                2007-10-02T00:27:50
author:              resiak at soc.pidgin.im
branch:              im.pidgin.cpw.resiak.disconnectreason
changelog:
Add disconnection reasons to qq

manifest:
format_version "1"

new_manifest [1f5582f64a4f52ecece19276855271c30d3445ed]

old_revision [e13c0fd64600fdc3758beda2797b41750d75807b]

patch "libpurple/protocols/qq/qq_proxy.c"
 from [9859ce4f1dcb239747e8051f71a059be48754c59]
   to [d487c77f9d5c8a3d30d24a4cc61c878fa7d46d28]

patch "libpurple/protocols/qq/recv_core.c"
 from [fbac7a12588c5db41273054563ab2862b22d3308]
   to [ecdc74aa8695b16248be8fae2f3ec8c9eb960f8c]

patch "libpurple/protocols/qq/sendqueue.c"
 from [2e604ec2972a5cecc75be1d8ad862f51f3b08276]
   to [fe217a782c40460f8163b6d422cefe56ee22f2e4]
-------------- next part --------------
#
#
# patch "libpurple/protocols/qq/qq_proxy.c"
#  from [9859ce4f1dcb239747e8051f71a059be48754c59]
#    to [d487c77f9d5c8a3d30d24a4cc61c878fa7d46d28]
# 
# patch "libpurple/protocols/qq/recv_core.c"
#  from [fbac7a12588c5db41273054563ab2862b22d3308]
#    to [ecdc74aa8695b16248be8fae2f3ec8c9eb960f8c]
# 
# patch "libpurple/protocols/qq/sendqueue.c"
#  from [2e604ec2972a5cecc75be1d8ad862f51f3b08276]
#    to [fe217a782c40460f8163b6d422cefe56ee22f2e4]
#
============================================================
--- libpurple/protocols/qq/qq_proxy.c	9859ce4f1dcb239747e8051f71a059be48754c59
+++ libpurple/protocols/qq/qq_proxy.c	d487c77f9d5c8a3d30d24a4cc61c878fa7d46d28
@@ -139,7 +139,7 @@ static void _qq_got_login(gpointer data,
 	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 
 	if (source < 0) {	/* socket returns -1 */
-		purple_connection_error(gc, error_message);
+		purple_connection_error_reason(gc, PURPLE_REASON_NETWORK_ERROR, error_message);
 		return;
 	}
 
@@ -494,7 +494,7 @@ gint qq_proxy_write(qq_data *qd, guint8 
 		ret = send(qd->fd, data, len, 0);
 	}
 	if (ret == -1)
-		purple_connection_error(qd->gc, strerror(errno));
+		purple_connection_error_reason(qd->gc, PURPLE_REASON_NETWORK_ERROR, strerror(errno));
 
 	return ret;
 }
============================================================
--- libpurple/protocols/qq/recv_core.c	fbac7a12588c5db41273054563ab2862b22d3308
+++ libpurple/protocols/qq/recv_core.c	ecdc74aa8695b16248be8fae2f3ec8c9eb960f8c
@@ -306,7 +306,8 @@ void qq_input_pending(gpointer data, gin
 	gc = (PurpleConnection *) data;
 
 	if(cond != PURPLE_INPUT_READ) {
-		purple_connection_error(gc, _("Socket error"));
+		purple_connection_error_reason(gc, PURPLE_REASON_NETWORK_ERROR,
+			_("Socket error"));
 		return;
 	}
 
@@ -316,7 +317,8 @@ void qq_input_pending(gpointer data, gin
 	/* here we have UDP proxy suppport */
 	len = qq_proxy_read(qd, buf, MAX_PACKET_SIZE);
 	if (len <= 0) {
-		purple_connection_error(gc, _("Unable to read from socket"));
+		purple_connection_error_reason(gc, PURPLE_REASON_NETWORK_ERROR,
+			_("Unable to read from socket"));
 		return;
 	} else {
 		_qq_packet_process(buf, len, gc);
============================================================
--- libpurple/protocols/qq/sendqueue.c	2e604ec2972a5cecc75be1d8ad862f51f3b08276
+++ libpurple/protocols/qq/sendqueue.c	fe217a782c40460f8163b6d422cefe56ee22f2e4
@@ -120,7 +120,8 @@ gboolean qq_sendqueue_timeout_callback(g
 			case QQ_CMD_KEEP_ALIVE:
 				if (qd->logged_in) {
 					purple_debug(PURPLE_DEBUG_ERROR, "QQ", "Connection lost!\n");
-					purple_connection_error(gc, _("Connection lost"));
+					purple_connection_error_reason(gc,
+						PURPLE_REASON_NETWORK_ERROR, _("Connection lost"));
 					qd->logged_in = FALSE;
 				}
 				p->resend_times = -1;
@@ -128,7 +129,8 @@ gboolean qq_sendqueue_timeout_callback(g
 			case QQ_CMD_LOGIN:
 			case QQ_CMD_REQUEST_LOGIN_TOKEN:
 				if (!qd->logged_in)	/* cancel login progress */
-					purple_connection_error(gc, _("Login failed, no reply"));
+					purple_connection_error_reason(gc,
+						PURPLE_REASON_NETWORK_ERROR, _("Login failed, no reply"));
 				p->resend_times = -1;
 				break;
 			default:{


More information about the Commits mailing list