im.pidgin.cpw.resiak.disconnectreason: fb9a441fdd156e4069ab1177fa8798bab87fa167

resiak at soc.pidgin.im resiak at soc.pidgin.im
Wed Oct 3 13:58:41 EDT 2007


revision:            fb9a441fdd156e4069ab1177fa8798bab87fa167
date:                2007-09-18T16:39:48
author:              resiak at soc.pidgin.im
branch:              im.pidgin.cpw.resiak.disconnectreason
changelog:
Modify gadu-gadu to use purple_connection_error_reason.  I'm not sure about
some of these.

manifest:
format_version "1"

new_manifest [8d01eae6d34c2ed8948c2ce800c3fa210ec21c90]

old_revision [470901ac4ac83680e42a3a76f159d8251ad115c0]

patch "libpurple/protocols/gg/gg.c"
 from [0faf07275cf08a60cb732273804f345f218bfe74]
   to [05c4b4e20213d0bff1c259975d1fe24e4e896577]
-------------- next part --------------
#
#
# patch "libpurple/protocols/gg/gg.c"
#  from [0faf07275cf08a60cb732273804f345f218bfe74]
#    to [05c4b4e20213d0bff1c259975d1fe24e4e896577]
#
============================================================
--- libpurple/protocols/gg/gg.c	0faf07275cf08a60cb732273804f345f218bfe74
+++ libpurple/protocols/gg/gg.c	05c4b4e20213d0bff1c259975d1fe24e4e896577
@@ -381,12 +381,15 @@ static void ggp_callback_register_accoun
 
 	if (email == NULL || p1 == NULL || p2 == NULL || t == NULL ||
 	    *email == '\0' || *p1 == '\0' || *p2 == '\0' || *t == '\0') {
-		purple_connection_error(gc, _("Fill in the registration fields."));
+		purple_connection_error_reason (gc, PURPLE_REASON_OTHER_ERROR,
+			_("Fill in the registration fields."));
 		goto exit_err;
 	}
 
 	if (g_utf8_collate(p1, p2) != 0) {
-		purple_connection_error(gc, _("Passwords do not match."));
+		purple_connection_error_reason (gc,
+			PURPLE_REASON_AUTHENTICATION_FAILED,
+			_("Passwords do not match."));
 		goto exit_err;
 	}
 
@@ -394,7 +397,7 @@ static void ggp_callback_register_accoun
 			token->id, t);
 	h = gg_register3(email, p1, token->id, t, 0);
 	if (h == NULL || !(s = h->data) || !s->success) {
-		purple_connection_error(gc,
+		purple_connection_error_reason (gc, PURPLE_REASON_OTHER_ERROR,
 			_("Unable to register new account. Error occurred.\n"));
 		goto exit_err;
 	}
@@ -1307,7 +1310,8 @@ static void ggp_callback_recv(gpointer _
 	if (!(ev = gg_watch_fd(info->session))) {
 		purple_debug_error("gg",
 			"ggp_callback_recv: gg_watch_fd failed -- CRITICAL!\n");
-		purple_connection_error(gc, _("Unable to read socket"));
+		purple_connection_error_reason (gc, PURPLE_REASON_NETWORK_ERROR,
+			_("Unable to read socket"));
 		return;
 	}
 
@@ -1460,7 +1464,8 @@ static void ggp_async_login_handler(gpoi
 
 	if (!(ev = gg_watch_fd(info->session))) {
 		purple_debug_error("gg", "login_handler: gg_watch_fd failed!\n");
-		purple_connection_error(gc, _("Unable to read socket"));
+		purple_connection_error_reason (gc, PURPLE_REASON_NETWORK_ERROR,
+			_("Unable to read socket"));
 		return;
 	}
 	purple_debug_info("gg", "login_handler: session->fd = %d\n", info->session->fd);
@@ -1506,7 +1511,9 @@ static void ggp_async_login_handler(gpoi
 		case GG_EVENT_CONN_FAILED:
 			purple_input_remove(gc->inpa);
 			gc->inpa = 0;
-			purple_connection_error(gc, _("Connection failed."));
+			purple_connection_error_reason (gc,
+				PURPLE_REASON_NETWORK_ERROR,
+				_("Connection failed."));
 			break;
 		default:
 			purple_debug_error("gg", "strange event: %d\n", ev->type);
@@ -1712,7 +1719,8 @@ static void ggp_login(PurpleAccount *acc
 
 	info->session = gg_login(glp);
 	if (info->session == NULL) {
-		purple_connection_error(gc, _("Connection failed."));
+		purple_connection_error_reason (gc, PURPLE_REASON_NETWORK_ERROR,
+			_("Connection failed."));
 		g_free(glp);
 		return;
 	}
@@ -1995,7 +2003,8 @@ static void ggp_keepalive(PurpleConnecti
 	if (gg_ping(info->session) < 0) {
 		purple_debug_info("gg", "Not connected to the server "
 				"or gg_session is not correct\n");
-		purple_connection_error(gc, _("Not connected to the server."));
+		purple_connection_error_reason (gc, PURPLE_REASON_NETWORK_ERROR,
+			_("Not connected to the server."));
 	}
 }
 /* }}} */


More information about the Commits mailing list