Mercurial > pidgin.yaz
changeset 20126:5eb52c076a2f
Add disconnection reasons to qq
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Tue, 02 Oct 2007 00:27:50 +0000 |
parents | 3e8531514ad7 |
children | a4fda4159937 |
files | libpurple/protocols/qq/qq_proxy.c libpurple/protocols/qq/recv_core.c libpurple/protocols/qq/sendqueue.c |
diffstat | 3 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/qq/qq_proxy.c Tue Oct 02 00:14:12 2007 +0000 +++ b/libpurple/protocols/qq/qq_proxy.c Tue Oct 02 00:27:50 2007 +0000 @@ -139,7 +139,7 @@ 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 @@ 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; }
--- a/libpurple/protocols/qq/recv_core.c Tue Oct 02 00:14:12 2007 +0000 +++ b/libpurple/protocols/qq/recv_core.c Tue Oct 02 00:27:50 2007 +0000 @@ -306,7 +306,8 @@ 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 @@ /* 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);
--- a/libpurple/protocols/qq/sendqueue.c Tue Oct 02 00:14:12 2007 +0000 +++ b/libpurple/protocols/qq/sendqueue.c Tue Oct 02 00:27:50 2007 +0000 @@ -120,7 +120,8 @@ 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 @@ 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:{