diff libpurple/protocols/gg/gg.c @ 21358:ba41f2a60253

Rename: * PurpleDisconnectReason to PurpleConnectionError; * elements of that enum from PURPLE_REASON_* to PURPLE_CONNECTION_ERROR_*; * purple_connection_reason_is_fatal to purple_connection_error_is_fatal.
author Will Thompson <will.thompson@collabora.co.uk>
date Sun, 14 Oct 2007 21:08:42 +0000
parents 94062344397c
children e747ac0c42d6
line wrap: on
line diff
--- a/libpurple/protocols/gg/gg.c	Sun Oct 14 12:19:20 2007 +0000
+++ b/libpurple/protocols/gg/gg.c	Sun Oct 14 21:08:42 2007 +0000
@@ -381,14 +381,15 @@
 
 	if (email == NULL || p1 == NULL || p2 == NULL || t == NULL ||
 	    *email == '\0' || *p1 == '\0' || *p2 == '\0' || *t == '\0') {
-		purple_connection_error_reason (gc, PURPLE_REASON_OTHER_ERROR,
+		purple_connection_error_reason (gc,
+			PURPLE_CONNECTION_ERROR_OTHER_ERROR,
 			_("Fill in the registration fields."));
 		goto exit_err;
 	}
 
 	if (g_utf8_collate(p1, p2) != 0) {
 		purple_connection_error_reason (gc,
-			PURPLE_REASON_AUTHENTICATION_FAILED,
+			PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED,
 			_("Passwords do not match."));
 		goto exit_err;
 	}
@@ -397,7 +398,8 @@
 			token->id, t);
 	h = gg_register3(email, p1, token->id, t, 0);
 	if (h == NULL || !(s = h->data) || !s->success) {
-		purple_connection_error_reason (gc, PURPLE_REASON_OTHER_ERROR,
+		purple_connection_error_reason (gc,
+			PURPLE_CONNECTION_ERROR_OTHER_ERROR,
 			_("Unable to register new account. Error occurred.\n"));
 		goto exit_err;
 	}
@@ -1310,7 +1312,8 @@
 	if (!(ev = gg_watch_fd(info->session))) {
 		purple_debug_error("gg",
 			"ggp_callback_recv: gg_watch_fd failed -- CRITICAL!\n");
-		purple_connection_error_reason (gc, PURPLE_REASON_NETWORK_ERROR,
+		purple_connection_error_reason (gc,
+			PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
 			_("Unable to read socket"));
 		return;
 	}
@@ -1464,7 +1467,8 @@
 
 	if (!(ev = gg_watch_fd(info->session))) {
 		purple_debug_error("gg", "login_handler: gg_watch_fd failed!\n");
-		purple_connection_error_reason (gc, PURPLE_REASON_NETWORK_ERROR,
+		purple_connection_error_reason (gc,
+			PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
 			_("Unable to read socket"));
 		return;
 	}
@@ -1512,7 +1516,7 @@
 			purple_input_remove(gc->inpa);
 			gc->inpa = 0;
 			purple_connection_error_reason (gc,
-				PURPLE_REASON_NETWORK_ERROR,
+				PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
 				_("Connection failed."));
 			break;
 		default:
@@ -1719,7 +1723,8 @@
 
 	info->session = gg_login(glp);
 	if (info->session == NULL) {
-		purple_connection_error_reason (gc, PURPLE_REASON_NETWORK_ERROR,
+		purple_connection_error_reason (gc,
+			PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
 			_("Connection failed."));
 		g_free(glp);
 		return;
@@ -2003,7 +2008,8 @@
 	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_reason (gc, PURPLE_REASON_NETWORK_ERROR,
+		purple_connection_error_reason (gc,
+			PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
 			_("Not connected to the server."));
 	}
 }