im.pidgin.cpw.resiak.disconnectreason: 1097e5cce225d8c22fc9905a8bd87b7b0f8dabbf

resiak at soc.pidgin.im resiak at soc.pidgin.im
Sun Nov 11 17:00:39 EST 2007


-----------------------------------------------------------------
Revision: 1097e5cce225d8c22fc9905a8bd87b7b0f8dabbf
Ancestor: 83d685bb81f6bd2fe15e1ff8a9eb0c56a9d66c3c
Author: resiak at soc.pidgin.im
Date: 2007-11-11T19:09:49
Branch: im.pidgin.cpw.resiak.disconnectreason

Modified files:
        libpurple/connection.c libpurple/connection.h

ChangeLog: 

Add PURPLE_CONNECTION_ERROR_{INVALID_USERNAME,INCORRECT_PASSWORD}, to be used
rather than _AUTHENTICATION_FAILED when it is known that the username/password
was incorrect (for example, on AIM).

-------------- next part --------------
============================================================
--- libpurple/connection.c	e4d14311392a9cb2164de30ff733227120ffd690
+++ libpurple/connection.c	0c12c7f2d006f4eebf507c4273a0fd92976d4928
@@ -588,6 +588,8 @@ purple_connection_error_is_fatal (Purple
 		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:
============================================================
--- libpurple/connection.h	311e334dfdc15344aec4581735721c3ede975af7
+++ libpurple/connection.h	69fc04c0d566a448ccb1697467e3b5bd83b51198
@@ -64,26 +64,32 @@ typedef enum
 	 *  data).
 	 */
 	PURPLE_CONNECTION_ERROR_NETWORK_ERROR = 0,
-	/** The username or password (or some other credential) was incorrect.
+	/** The username supplied was not valid. */
+	PURPLE_CONNECTION_ERROR_INVALID_USERNAME = 1,
+	/** The password was incorrect. */
+	PURPLE_CONNECTION_ERROR_INCORRECT_PASSWORD = 2,
+	/** The username, password or some other credential was incorrect.  Use
+	 *  the above two errors if the username or password in particular are
+	 *  known to be incorrect.
 	 */
-	PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED = 1,
+	PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED = 3,
 	/** libpurple doesn't speak any of the authentication methods the
 	 *  server offered.
 	 */
-	PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE = 2,
+	PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE = 4,
 	/** libpurple was built without SSL support, and the connection needs
 	 *  SSL.
 	 */
-	PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT = 3,
+	PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT = 5,
 	/** 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_CONNECTION_ERROR_ENCRYPTION_ERROR = 4,
+	PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR = 6,
 	/** Someone is already connected to the server using the name you are
 	 *  trying to connect with.
 	 */
-	PURPLE_CONNECTION_ERROR_NAME_IN_USE = 5,
+	PURPLE_CONNECTION_ERROR_NAME_IN_USE = 7,
 
 	/** The username/server/other preference for the account isn't valid.
 	 *  For instance, on IRC the screen name cannot contain white space.
@@ -94,27 +100,27 @@ typedef enum
 	 *        other account preferences should be validated when the
 	 *        account is created.
 	 */
-	PURPLE_CONNECTION_ERROR_INVALID_SETTINGS = 6,
+	PURPLE_CONNECTION_ERROR_INVALID_SETTINGS = 8,
 
 	/** The server did not provide a SSL certificate. */
-	PURPLE_CONNECTION_ERROR_CERT_NOT_PROVIDED = 7,
+	PURPLE_CONNECTION_ERROR_CERT_NOT_PROVIDED = 9,
 	/** The server's SSL certificate could not be trusted. */
-	PURPLE_CONNECTION_ERROR_CERT_UNTRUSTED = 8,
+	PURPLE_CONNECTION_ERROR_CERT_UNTRUSTED = 10,
 	/** The server's SSL certificate has expired. */
-	PURPLE_CONNECTION_ERROR_CERT_EXPIRED = 9,
+	PURPLE_CONNECTION_ERROR_CERT_EXPIRED = 11,
 	/** The server's SSL certificate is not yet valid. */
-	PURPLE_CONNECTION_ERROR_CERT_NOT_ACTIVATED = 10,
+	PURPLE_CONNECTION_ERROR_CERT_NOT_ACTIVATED = 12,
 	/** The server's SSL certificate did not match its hostname. */
-	PURPLE_CONNECTION_ERROR_CERT_HOSTNAME_MISMATCH = 11,
+	PURPLE_CONNECTION_ERROR_CERT_HOSTNAME_MISMATCH = 13,
 	/** The server's SSL certificate does not have the expected
 	 *  fingerprint.
 	 */
-	PURPLE_CONNECTION_ERROR_CERT_FINGERPRINT_MISMATCH = 12,
+	PURPLE_CONNECTION_ERROR_CERT_FINGERPRINT_MISMATCH = 14,
 	/** The server's SSL certificate is self-signed.  */
-	PURPLE_CONNECTION_ERROR_CERT_SELF_SIGNED = 13,
+	PURPLE_CONNECTION_ERROR_CERT_SELF_SIGNED = 15,
 	/** There was some other error validating the server's SSL certificate.
 	 */
-	PURPLE_CONNECTION_ERROR_CERT_OTHER_ERROR = 14,
+	PURPLE_CONNECTION_ERROR_CERT_OTHER_ERROR = 16,
 
 	/** Some other error occured which fits into none of the other
 	 *  categories.
@@ -123,7 +129,7 @@ typedef enum
 	 * this is the last member of the enum when sanity-checking; if other
 	 * reasons are added after it, the check must be updated.
 	 */
-	PURPLE_CONNECTION_ERROR_OTHER_ERROR = 15
+	PURPLE_CONNECTION_ERROR_OTHER_ERROR = 17
 } PurpleConnectionError;
 
 /** Holds the type of an error along with its description. */


More information about the Commits mailing list