changeset 21423:375d10e84c4b

Consensus on #pidgin is that certificate errors and AUTHENTICATION_IMPOSSIBLE (which occurs, for example, when the server and Pidgin speak no common auth method on xmpp) should be fatal. This leaves us with exactly one non-fatal condition: network errors.
author Will Thompson <will.thompson@collabora.co.uk>
date Sun, 11 Nov 2007 21:22:12 +0000
parents 56a608b80fda
children ba061949650c
files libpurple/connection.c
diffstat 1 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/connection.c	Sun Nov 11 19:09:49 2007 +0000
+++ b/libpurple/connection.c	Sun Nov 11 21:22:12 2007 +0000
@@ -578,7 +578,16 @@
 	switch (reason)
 	{
 		case PURPLE_CONNECTION_ERROR_NETWORK_ERROR:
+			return FALSE;
+		case PURPLE_CONNECTION_ERROR_INVALID_USERNAME:
+		case PURPLE_CONNECTION_ERROR_INCORRECT_PASSWORD:
+		case PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED:
 		case PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE:
+		case PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT:
+		case PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR:
+		case PURPLE_CONNECTION_ERROR_NAME_IN_USE:
+		case PURPLE_CONNECTION_ERROR_INVALID_SETTINGS:
+		case PURPLE_CONNECTION_ERROR_OTHER_ERROR:
 		case PURPLE_CONNECTION_ERROR_CERT_NOT_PROVIDED:
 		case PURPLE_CONNECTION_ERROR_CERT_UNTRUSTED:
 		case PURPLE_CONNECTION_ERROR_CERT_EXPIRED:
@@ -587,15 +596,6 @@
 		case PURPLE_CONNECTION_ERROR_CERT_FINGERPRINT_MISMATCH:
 		case PURPLE_CONNECTION_ERROR_CERT_SELF_SIGNED:
 		case PURPLE_CONNECTION_ERROR_CERT_OTHER_ERROR:
-			return FALSE;
-		case PURPLE_CONNECTION_ERROR_INVALID_USERNAME:
-		case PURPLE_CONNECTION_ERROR_INCORRECT_PASSWORD:
-		case PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED:
-		case PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT:
-		case PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR:
-		case PURPLE_CONNECTION_ERROR_NAME_IN_USE:
-		case PURPLE_CONNECTION_ERROR_INVALID_SETTINGS:
-		case PURPLE_CONNECTION_ERROR_OTHER_ERROR:
 			return TRUE;
 		default:
 			g_return_val_if_reached(TRUE);