im.pidgin.cpw.resiak.disconnectreason: f756e8b556f3fb3264406c9c72cff3c760643cd6

resiak at soc.pidgin.im resiak at soc.pidgin.im
Wed Oct 3 13:58:35 EDT 2007


revision:            f756e8b556f3fb3264406c9c72cff3c760643cd6
date:                2007-10-02T17:16:16
author:              resiak at soc.pidgin.im
branch:              im.pidgin.cpw.resiak.disconnectreason
changelog:
Rename PURPLE_REASON_INVALID_USERNAME to PURPLE_REASON_INVALID_SETTINGS, so it
can be used when a server parameter is required but not supplied (for example).

manifest:
format_version "1"

new_manifest [88a702a0b6c6119dc531897262b7b0c826a259be]

old_revision [e3b204f1edc5f14a4085b971931650a66a0c58b1]

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

patch "libpurple/protocols/irc/irc.c"
 from [273b72832279686f56c091c33e98b37449e4ddb0]
   to [26586b79c4a0992ef6e717d0b5e18f5fc930c43c]

patch "libpurple/protocols/irc/msgs.c"
 from [ae0e4426ebe605791ef7124149f0dd77ce06d31d]
   to [d8ab8503315cd9c186acf2491687dacd211a9f32]

patch "libpurple/protocols/jabber/jabber.c"
 from [8191cbff23ad0d3c6c575bedbb597ac7e3dfe1e6]
   to [fc86b9c92b6b59377f22254dd598cf5054478f04]

patch "libpurple/protocols/sametime/sametime.c"
 from [42519594ab0617a01943ec43ec89bb78fabf43d7]
   to [f867b61b61782545fabd4258f80160e10f3fa51c]
-------------- next part --------------
#
#
# patch "libpurple/connection.h"
#  from [c471b66ce9c6730e895e13e365656971946db7ce]
#    to [87b492ace77a5baef2eca453b2047b1b88dd4158]
# 
# patch "libpurple/protocols/irc/irc.c"
#  from [273b72832279686f56c091c33e98b37449e4ddb0]
#    to [26586b79c4a0992ef6e717d0b5e18f5fc930c43c]
# 
# patch "libpurple/protocols/irc/msgs.c"
#  from [ae0e4426ebe605791ef7124149f0dd77ce06d31d]
#    to [d8ab8503315cd9c186acf2491687dacd211a9f32]
# 
# patch "libpurple/protocols/jabber/jabber.c"
#  from [8191cbff23ad0d3c6c575bedbb597ac7e3dfe1e6]
#    to [fc86b9c92b6b59377f22254dd598cf5054478f04]
# 
# patch "libpurple/protocols/sametime/sametime.c"
#  from [42519594ab0617a01943ec43ec89bb78fabf43d7]
#    to [f867b61b61782545fabd4258f80160e10f3fa51c]
#
============================================================
--- libpurple/connection.h	c471b66ce9c6730e895e13e365656971946db7ce
+++ libpurple/connection.h	87b492ace77a5baef2eca453b2047b1b88dd4158
@@ -79,12 +79,16 @@ typedef enum
 	 */
 	PURPLE_REASON_NAME_IN_USE,
 
-	/** The username for the account isn't valid.
+	/** The username/server/other preference for the account isn't valid.
+	 *  For instance, on IRC the screen name cannot contain white space.
+	 *  This reason should not be used for incorrect passwords etc: use
+	 *  #PURPLE_REASON_AUTHENTICATION_FAILED for that.
+	 *
 	 *  @todo This reason really shouldn't be necessary.  Usernames and
 	 *        other account preferences should be validated when the
 	 *        account is created.
 	 */
-	PURPLE_REASON_INVALID_USERNAME,
+	PURPLE_REASON_INVALID_SETTINGS,
 
 	/** The server did not provide a SSL certificate. */
 	PURPLE_REASON_CERT_NOT_PROVIDED,
============================================================
--- libpurple/protocols/irc/irc.c	273b72832279686f56c091c33e98b37449e4ddb0
+++ libpurple/protocols/irc/irc.c	26586b79c4a0992ef6e717d0b5e18f5fc930c43c
@@ -297,7 +297,7 @@ static void irc_login(PurpleAccount *acc
 	gc->flags |= PURPLE_CONNECTION_NO_NEWLINES;
 
 	if (strpbrk(username, " \t\v\r\n") != NULL) {
-		purple_connection_error_reason (gc, PURPLE_REASON_INVALID_USERNAME,
+		purple_connection_error_reason (gc, PURPLE_REASON_INVALID_SETTINGS,
 			_("IRC nicks may not contain whitespace"));
 		return;
 	}
============================================================
--- libpurple/protocols/irc/msgs.c	ae0e4426ebe605791ef7124149f0dd77ce06d31d
+++ libpurple/protocols/irc/msgs.c	d8ab8503315cd9c186acf2491687dacd211a9f32
@@ -911,7 +911,7 @@ void irc_msg_badnick(struct irc_conn *ir
 
 	} else {
 		gc->wants_to_die = TRUE;
-		purple_connection_error_reason (gc, PURPLE_REASON_INVALID_USERNAME,
+		purple_connection_error_reason (gc, PURPLE_REASON_INVALID_SETTINGS,
 				  _("Your selected account name was rejected by the server.  It probably contains invalid characters."));
 	}
 }
============================================================
--- libpurple/protocols/jabber/jabber.c	8191cbff23ad0d3c6c575bedbb597ac7e3dfe1e6
+++ libpurple/protocols/jabber/jabber.c	fc86b9c92b6b59377f22254dd598cf5054478f04
@@ -588,13 +588,13 @@ jabber_login(PurpleAccount *account)
 	js->old_length = -1;
 
 	if(!js->user) {
-		purple_connection_error_reason (gc, PURPLE_REASON_INVALID_USERNAME,
+		purple_connection_error_reason (gc, PURPLE_REASON_INVALID_SETTINGS,
 			_("Invalid XMPP ID"));
 		return;
 	}
 	
 	if (!js->user->domain || *(js->user->domain) == '\0') {
-		purple_connection_error_reason (gc, PURPLE_REASON_INVALID_USERNAME,
+		purple_connection_error_reason (gc, PURPLE_REASON_INVALID_SETTINGS,
 			_("Invalid XMPP ID. Domain must be set."));
 		return;
 	}
@@ -1079,7 +1079,7 @@ void jabber_register_account(PurpleAccou
 	js->old_length = -1;
 
 	if(!js->user) {
-		purple_connection_error_reason (gc, PURPLE_REASON_INVALID_USERNAME,
+		purple_connection_error_reason (gc, PURPLE_REASON_INVALID_SETTINGS,
 			_("Invalid XMPP ID"));
 		return;
 	}
============================================================
--- libpurple/protocols/sametime/sametime.c	42519594ab0617a01943ec43ec89bb78fabf43d7
+++ libpurple/protocols/sametime/sametime.c	f867b61b61782545fabd4258f80160e10f3fa51c
@@ -3646,7 +3646,7 @@ static void prompt_host_cancel_cb(Purple
 
 static void prompt_host_cancel_cb(PurpleConnection *gc) {
   const char *msg = _("No Sametime Community Server specified");
-  purple_connection_error_reason(gc, PURPLE_REASON_INVALID_USERNAME, msg);
+  purple_connection_error_reason(gc, PURPLE_REASON_INVALID_SETTINGS, msg);
 }
 
 


More information about the Commits mailing list