im.pidgin.cpw.resiak.disconnectreason: 8648cc67b0f11cdb0c5d48a703bca11b56606a16

resiak at soc.pidgin.im resiak at soc.pidgin.im
Sat Oct 6 13:56:13 EDT 2007


revision:            8648cc67b0f11cdb0c5d48a703bca11b56606a16
date:                2007-10-06T12:05:22
author:              resiak at soc.pidgin.im
branch:              im.pidgin.cpw.resiak.disconnectreason
changelog:
Split the "you don't have SSL support" meaning of
PURPLE_REASON_ENCRYPTION_ERROR into a new reason, PURPLE_REASON_NO_SSL_SUPPORT.
This will let UIs give proper errors that reference the SSLfaq!

manifest:
format_version "1"

new_manifest [6496486d741dd7f40aad7948fa29257f39956f80]

old_revision [9f9f57eb46db7e496b38d05b65adf29a8ab5fb13]

patch "libpurple/connection.c"
 from [384a45acd2e2d12489bda8c149284999a12e11de]
   to [5a2434e95f0bfb7b590ad00a748dba1959ac7ef7]

patch "libpurple/connection.h"
 from [87b492ace77a5baef2eca453b2047b1b88dd4158]
   to [2383752fde3540e66c45dc138d3dbeb8a6cbed4f]

patch "libpurple/protocols/irc/irc.c"
 from [b30234a4c65dda67d1d13c0263cbb2a74eb733a2]
   to [e6e54bf7502257d53be217c85f090e55f943a317]

patch "libpurple/protocols/jabber/auth.c"
 from [077140bf57ab00f66420ed2f86a94e44ecbce989]
   to [d9edb0dcf9ad22d11ff96a2e5eb46c79bf891589]

patch "libpurple/protocols/jabber/jabber.c"
 from [76eaf130727587766feb9017e6636db633f6d195]
   to [90f5e32e69693709fabba9f3aaf905e5c20456d3]

patch "libpurple/protocols/msn/msn.c"
 from [fd0da56f49cda0ceea3a05eff21f2f49e4dfe3fd]
   to [f47432f113a925840f520f3ed4d05f8045c94fe5]

patch "libpurple/protocols/novell/novell.c"
 from [488f636599bd8dba8d548590c443a0416eee830f]
   to [1bbcdfaf1810cfe9c805b852fb987de147a18724]
-------------- next part --------------
============================================================
--- libpurple/connection.c	384a45acd2e2d12489bda8c149284999a12e11de
+++ libpurple/connection.c	5a2434e95f0bfb7b590ad00a748dba1959ac7ef7
@@ -573,14 +573,12 @@ purple_connection_reason_is_fatal (Purpl
 		case PURPLE_REASON_CERT_OTHER_ERROR:
 			return FALSE;
 		case PURPLE_REASON_AUTHENTICATION_FAILED:
+		case PURPLE_REASON_NO_SSL_SUPPORT:
 		case PURPLE_REASON_ENCRYPTION_ERROR:
 		case PURPLE_REASON_NAME_IN_USE:
 		case PURPLE_REASON_INVALID_SETTINGS:
 		case PURPLE_REASON_OTHER_ERROR:
 			return TRUE;
-		default:
-			g_assert_not_reached ();
-			return TRUE;
 	}
 }
 
============================================================
--- libpurple/connection.h	87b492ace77a5baef2eca453b2047b1b88dd4158
+++ libpurple/connection.h	2383752fde3540e66c45dc138d3dbeb8a6cbed4f
@@ -70,9 +70,14 @@ typedef enum
 	 *  server offered.
 	 */
 	PURPLE_REASON_AUTHENTICATION_IMPOSSIBLE,
-	/** There was an error negotiating SSL on this connection, or encryption
-	 *  was unavailable and an account option was set to require it.
+	/** libpurple was built without SSL support, and the connection needs
+	 *  SSL.
 	 */
+	PURPLE_REASON_NO_SSL_SUPPORT,
+	/** There was an error negotiating SSL on this connection, or the
+	 *  server does not support encryption but an account option was set to
+	 *  require it.
+	 */
 	PURPLE_REASON_ENCRYPTION_ERROR,
 	/** Someone is already connected to the server using the name you are
 	 *  trying to connect with.
============================================================
--- libpurple/protocols/irc/irc.c	b30234a4c65dda67d1d13c0263cbb2a74eb733a2
+++ libpurple/protocols/irc/irc.c	e6e54bf7502257d53be217c85f090e55f943a317
@@ -329,7 +329,7 @@ static void irc_login(PurpleAccount *acc
 					irc_login_cb_ssl, irc_ssl_connect_failure, gc);
 		} else {
 			gc->wants_to_die = TRUE;
-			purple_connection_error_reason (gc, PURPLE_REASON_ENCRYPTION_ERROR,
+			purple_connection_error_reason (gc, PURPLE_REASON_NO_SSL_SUPPORT,
 				_("SSL support unavailable"));
 			return;
 		}
============================================================
--- libpurple/protocols/jabber/auth.c	077140bf57ab00f66420ed2f86a94e44ecbce989
+++ libpurple/protocols/jabber/auth.c	d9edb0dcf9ad22d11ff96a2e5eb46c79bf891589
@@ -51,7 +51,7 @@ jabber_process_starttls(JabberStream *js
 			return TRUE;
 		} else if(xmlnode_get_child(starttls, "required")) {
 			js->gc->wants_to_die = TRUE;
-			purple_connection_error_reason (js->gc, PURPLE_REASON_ENCRYPTION_ERROR,
+			purple_connection_error_reason (js->gc, PURPLE_REASON_NO_SSL_SUPPORT,
 				_("Server requires TLS/SSL for login.  No TLS/SSL support found."));
 			return TRUE;
 		}
============================================================
--- libpurple/protocols/jabber/jabber.c	76eaf130727587766feb9017e6636db633f6d195
+++ libpurple/protocols/jabber/jabber.c	90f5e32e69693709fabba9f3aaf905e5c20456d3
@@ -628,7 +628,7 @@ jabber_login(PurpleAccount *account)
 					jabber_ssl_connect_failure, js->gc);
 		} else {
 			js->gc->wants_to_die = TRUE;
-			purple_connection_error_reason (js->gc, PURPLE_REASON_ENCRYPTION_ERROR,
+			purple_connection_error_reason (js->gc, PURPLE_REASON_NO_SSL_SUPPORT,
 				_("SSL support unavailable"));
 		}
 	}
@@ -1117,7 +1117,7 @@ void jabber_register_account(PurpleAccou
 					jabber_login_callback_ssl, jabber_ssl_connect_failure, gc);
 		} else {
 			gc->wants_to_die = TRUE;
-			purple_connection_error_reason (gc, PURPLE_REASON_ENCRYPTION_ERROR,
+			purple_connection_error_reason (gc, PURPLE_REASON_NO_SSL_SUPPORT,
 				_("SSL support unavailable"));
 		}
 	}
============================================================
--- libpurple/protocols/msn/msn.c	fd0da56f49cda0ceea3a05eff21f2f49e4dfe3fd
+++ libpurple/protocols/msn/msn.c	f47432f113a925840f520f3ed4d05f8045c94fe5
@@ -800,7 +800,7 @@ msn_login(PurpleAccount *account)
 	if (!purple_ssl_is_supported())
 	{
 		gc->wants_to_die = TRUE;
-		purple_connection_error_reason (gc, PURPLE_REASON_ENCRYPTION_ERROR,
+		purple_connection_error_reason (gc, PURPLE_REASON_NO_SSL_SUPPORT,
 			_("SSL support is needed for MSN. Please install a supported "
 			  "SSL library."));
 		return;
============================================================
--- libpurple/protocols/novell/novell.c	488f636599bd8dba8d548590c443a0416eee830f
+++ libpurple/protocols/novell/novell.c	1bbcdfaf1810cfe9c805b852fb987de147a18724
@@ -2209,7 +2209,7 @@ novell_login(PurpleAccount * account)
 		if (user->conn->ssl_conn->data == NULL) {
 			gc->wants_to_die = TRUE;
 			purple_connection_error_reason (gc,
-				PURPLE_REASON_ENCRYPTION_ERROR,
+				PURPLE_REASON_NO_SSL_SUPPORT,
 				_("Error. SSL support is not installed."));
 		}
 	}


More information about the Commits mailing list