# HG changeset patch # User Will Thompson # Date 1194808189 0 # Node ID 56a608b80fdad324c16e761cc9381d918e603dcf # Parent be50064a83e09061880aaddae27ccbff3473f740 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). diff -r be50064a83e0 -r 56a608b80fda libpurple/connection.c --- a/libpurple/connection.c Sun Nov 11 17:01:59 2007 +0000 +++ b/libpurple/connection.c Sun Nov 11 19:09:49 2007 +0000 @@ -588,6 +588,8 @@ 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: diff -r be50064a83e0 -r 56a608b80fda libpurple/connection.h --- a/libpurple/connection.h Sun Nov 11 17:01:59 2007 +0000 +++ b/libpurple/connection.h Sun Nov 11 19:09:49 2007 +0000 @@ -64,26 +64,32 @@ * 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 @@ * 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 @@ * 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. */