im.pidgin.cpw.resiak.disconnectreason: a2b64f1757510e3f25716a6c0497cd4fa17dcfb3

resiak at soc.pidgin.im resiak at soc.pidgin.im
Tue Oct 9 09:45:44 EDT 2007


-----------------------------------------------------------------
Revision: a2b64f1757510e3f25716a6c0497cd4fa17dcfb3
Ancestor: cf6996bce6763681599c7a5412f6b256943226b0
Author: resiak at soc.pidgin.im
Date: 2007-10-09T13:42:15
Branch: im.pidgin.cpw.resiak.disconnectreason

Modified files:
        libpurple/protocols/bonjour/bonjour.c
        libpurple/protocols/irc/irc.c libpurple/protocols/irc/msgs.c
        libpurple/protocols/msn/msn.c
        libpurple/protocols/msn/session.c
        libpurple/protocols/myspace/myspace.c
        libpurple/protocols/novell/novell.c
        libpurple/protocols/oscar/flap_connection.c
        libpurple/protocols/oscar/oscar.c
        libpurple/protocols/qq/login_logout.c
        libpurple/protocols/sametime/sametime.c
        libpurple/protocols/silc/silc.c
        libpurple/protocols/simple/simple.c
        libpurple/protocols/yahoo/yahoo.c

ChangeLog: 

Remove explicit setting of wants_to_die from prpls.

-------------- next part --------------
============================================================
--- libpurple/protocols/bonjour/bonjour.c	cd5ee581acb24960c3870971c143c0dd70c8a2b8
+++ libpurple/protocols/bonjour/bonjour.c	8b00dff3ff6c13c59170d1eb563de910b999d608
@@ -102,7 +102,6 @@ bonjour_login(PurpleAccount *account)
 
 #ifdef _WIN32
 	if (!dns_sd_available()) {
-		gc->wants_to_die = TRUE;
 		purple_connection_error_reason(gc, PURPLE_REASON_OTHER_ERROR,
 			_("The Apple Bonjour For Windows toolkit wasn't found, see the FAQ at: "
 			  "http://developer.pidgin.im/wiki/Using%20Pidgin#CanIusePidginforBonjourLink-LocalMessaging"
============================================================
--- libpurple/protocols/irc/irc.c	e6e54bf7502257d53be217c85f090e55f943a317
+++ libpurple/protocols/irc/irc.c	7aaf095774090bf778e42f0abfd23c188ead0da7
@@ -297,7 +297,6 @@ static void irc_login(PurpleAccount *acc
 	gc->flags |= PURPLE_CONNECTION_NO_NEWLINES;
 
 	if (strpbrk(username, " \t\v\r\n") != NULL) {
-		gc->wants_to_die = TRUE;
 		purple_connection_error_reason (gc, PURPLE_REASON_INVALID_SETTINGS,
 			_("IRC nicks may not contain whitespace"));
 		return;
@@ -328,7 +327,6 @@ static void irc_login(PurpleAccount *acc
 					purple_account_get_int(account, "port", IRC_DEFAULT_SSL_PORT),
 					irc_login_cb_ssl, irc_ssl_connect_failure, gc);
 		} else {
-			gc->wants_to_die = TRUE;
 			purple_connection_error_reason (gc, PURPLE_REASON_NO_SSL_SUPPORT,
 				_("SSL support unavailable"));
 			return;
============================================================
--- libpurple/protocols/irc/msgs.c	a12a271bcf9e59020f20ca48f41e36c05cce2cff
+++ libpurple/protocols/irc/msgs.c	f1d301c2d8a818b168a1cdd35218e862ed51589a
@@ -913,7 +913,6 @@ void irc_msg_badnick(struct irc_conn *ir
 				  _("Your selected nickname was rejected by the server.  It probably contains invalid characters."));
 
 	} else {
-		gc->wants_to_die = TRUE;
 		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/msn/msn.c	f47432f113a925840f520f3ed4d05f8045c94fe5
+++ libpurple/protocols/msn/msn.c	96ccb0fdbc435eb961e859abda29a73fa45fd008
@@ -799,7 +799,6 @@ msn_login(PurpleAccount *account)
 
 	if (!purple_ssl_is_supported())
 	{
-		gc->wants_to_die = TRUE;
 		purple_connection_error_reason (gc, PURPLE_REASON_NO_SSL_SUPPORT,
 			_("SSL support is needed for MSN. Please install a supported "
 			  "SSL library."));
============================================================
--- libpurple/protocols/msn/session.c	1088791debfecb39cb6e1c8266c06c62206f973b
+++ libpurple/protocols/msn/session.c	adcb051db5dc55f9804178489275b9a0ef317a33
@@ -346,7 +346,6 @@ msn_session_set_error(MsnSession *sessio
 			msg = g_strdup(_("Error parsing HTTP."));
 			break;
 		case MSN_ERROR_SIGN_OTHER:
-			gc->wants_to_die = TRUE;
 			reason = PURPLE_REASON_NAME_IN_USE;
 			msg = g_strdup(_("You have signed on from another location."));
 			if (!purple_account_get_remember_password(session->account))
@@ -365,7 +364,6 @@ msn_session_set_error(MsnSession *sessio
 			break;
 		case MSN_ERROR_AUTH:
 			reason = PURPLE_REASON_AUTHENTICATION_FAILED;
-			gc->wants_to_die = TRUE;
 			msg = g_strdup_printf(_("Unable to authenticate: %s"),
 								  (info == NULL ) ?
 								  _("Unknown error") : info);
============================================================
--- libpurple/protocols/myspace/myspace.c	eeb4e6624cda495aecc02688b9d0248eef9446f7
+++ libpurple/protocols/myspace/myspace.c	14dd48188460d2bf63e94758c716ad788d945ccd
@@ -291,7 +291,6 @@ msim_login(PurpleAccount *acct)
 		/* Notify an error message also, because this is important! */
 		purple_notify_error(acct, _("MySpaceIM Error"), str, NULL);
 
-		gc->wants_to_die = TRUE;
 		purple_connection_error_reason (gc,
 			PURPLE_REASON_AUTHENTICATION_FAILED, str);
 		g_free(str);
@@ -1559,7 +1558,6 @@ msim_we_are_logged_on(MsimSession *sessi
 		purple_notify_error(session->account, 
 				_("No username set"),
 				_("Please go to http://editprofile.myspace.com/index.cfm?fuseaction=profile.username and choose a username and try to login again."), NULL);
-		session->gc->wants_to_die = TRUE;
 		purple_connection_error_reason (session->gc, PURPLE_REASON_AUTHENTICATION_FAILED, _("No username set"));
 		return FALSE;
 	}
@@ -1801,13 +1799,11 @@ msim_error(MsimSession *session, MsimMes
 		switch (err) {
 			case 260: /* Incorrect password */
 				reason = PURPLE_REASON_AUTHENTICATION_FAILED;
-				session->gc->wants_to_die = TRUE;
 				if (!purple_account_get_remember_password(session->account))
 					purple_account_set_password(session->account, NULL);
 				break;
 			case 6: /* Logged in elsewhere */
 				reason = PURPLE_REASON_NAME_IN_USE;
-				session->gc->wants_to_die = TRUE;
 				if (!purple_account_get_remember_password(session->account))
 					purple_account_set_password(session->account, NULL);
 				break;
============================================================
--- libpurple/protocols/novell/novell.c	1bbcdfaf1810cfe9c805b852fb987de147a18724
+++ libpurple/protocols/novell/novell.c	0395d12de718699337e8da2ea832243d34e72403
@@ -133,7 +133,6 @@ _login_resp_cb(NMUser * user, NMERR_T re
 				 */
 				if (!purple_account_get_remember_password(gc->account))
 					purple_account_set_password(gc->account, NULL);
-				gc->wants_to_die = TRUE;
 				reason = PURPLE_REASON_AUTHENTICATION_FAILED;
 				break;
 			default:
@@ -2019,7 +2018,6 @@ _evt_user_disconnect(NMUser * user, NMEv
 	gc = purple_account_get_connection(account);
 	if (gc)
 	{
-		gc->wants_to_die = TRUE; /* we don't want to reconnect in this case */
 		if (!purple_account_get_remember_password(account))
 			purple_account_set_password(account, NULL);
 		purple_connection_error_reason (gc, PURPLE_REASON_NAME_IN_USE,
@@ -2178,7 +2176,6 @@ novell_login(PurpleAccount * account)
 		 */
 
 		/* ...but for now just error out with a nice message. */
-		gc->wants_to_die = TRUE;
 		purple_connection_error_reason (gc, PURPLE_REASON_INVALID_SETTINGS,
 			_("Unable to connect to server. Please enter the "
 			  "address of the server you wish to connect to."));
@@ -2207,7 +2204,6 @@ novell_login(PurpleAccount * account)
 													  user->conn->addr, user->conn->port,
 													  novell_ssl_connected_cb, novell_ssl_connect_error, gc);
 		if (user->conn->ssl_conn->data == NULL) {
-			gc->wants_to_die = TRUE;
 			purple_connection_error_reason (gc,
 				PURPLE_REASON_NO_SSL_SUPPORT,
 				_("Error. SSL support is not installed."));
============================================================
--- libpurple/protocols/oscar/flap_connection.c	e510dc51ccc6a861e40fc76a2510de9a285dc0b6
+++ libpurple/protocols/oscar/flap_connection.c	dbb0228c3e62ce7feeb6bbbe2e0eb550f3733614
@@ -387,7 +387,6 @@ flap_connection_destroy_cb(gpointer data
 			tmp = g_strdup(_("You have signed on from another location."));
 			if (!purple_account_get_remember_password(account))
 				purple_account_set_password(account, NULL);
-			od->gc->wants_to_die = TRUE;
 		} else if (conn->disconnect_reason == OSCAR_DISCONNECT_REMOTE_CLOSED)
 			tmp = g_strdup(_("Server closed the connection."));
 		else if (conn->disconnect_reason == OSCAR_DISCONNECT_LOST_CONNECTION)
============================================================
--- libpurple/protocols/oscar/oscar.c	c2ad4adde2cf631f07b4facf632d25678a66f1f0
+++ libpurple/protocols/oscar/oscar.c	d867977c60a006f7cd20f27755ac63d9f9d6a599
@@ -1258,7 +1258,6 @@ oscar_login(PurpleAccount *account)
 	if (!aim_snvalid(purple_account_get_username(account))) {
 		gchar *buf;
 		buf = g_strdup_printf(_("Unable to login: Could not sign on as %s because the screen name is invalid.  Screen names must be a valid email address, or start with a letter and contain only letters, numbers and spaces, or contain only numbers."), purple_account_get_username(account));
-		gc->wants_to_die = TRUE;
 		purple_connection_error_reason(gc, PURPLE_REASON_INVALID_SETTINGS, buf);
 		g_free(buf);
 	}
@@ -1342,19 +1341,16 @@ purple_parse_auth_resp(OscarData *od, Fl
 		switch (info->errorcode) {
 		case 0x01:
 			/* Unregistered screen name */
-			gc->wants_to_die = TRUE;
 			purple_connection_error_reason(gc, PURPLE_REASON_AUTHENTICATION_FAILED, _("Invalid screen name."));
 			break;
 		case 0x05:
 			/* Incorrect password */
-			gc->wants_to_die = TRUE;
 			if (!purple_account_get_remember_password(account))
 				purple_account_set_password(account, NULL);
 			purple_connection_error_reason(gc, PURPLE_REASON_AUTHENTICATION_FAILED, _("Incorrect password."));
 			break;
 		case 0x11:
 			/* Suspended account */
-			gc->wants_to_die = TRUE;
 			purple_connection_error_reason(gc, PURPLE_REASON_AUTHENTICATION_FAILED, _("Your account is currently suspended."));
 			break;
 		case 0x14:
@@ -1363,22 +1359,18 @@ purple_parse_auth_resp(OscarData *od, Fl
 			break;
 		case 0x18:
 			/* screen name connecting too frequently */
-			gc->wants_to_die = TRUE;
 			purple_connection_error_reason(gc, PURPLE_REASON_OTHER_ERROR, _("You have been connecting and disconnecting too frequently. Wait ten minutes and try again. If you continue to try, you will need to wait even longer."));
 			break;
 		case 0x1c:
 			/* client too old */
-			gc->wants_to_die = TRUE;
 			g_snprintf(buf, sizeof(buf), _("The client version you are using is too old. Please upgrade at %s"), PURPLE_WEBSITE);
 			purple_connection_error_reason(gc, PURPLE_REASON_OTHER_ERROR, buf);
 			break;
 		case 0x1d:
 			/* IP address connecting too frequently */
-			gc->wants_to_die = TRUE;
 			purple_connection_error_reason(gc, PURPLE_REASON_OTHER_ERROR, _("You have been connecting and disconnecting too frequently. Wait ten minutes and try again. If you continue to try, you will need to wait even longer."));
 			break;
 		default:
-			gc->wants_to_die = TRUE;
 			purple_connection_error_reason(gc, PURPLE_REASON_AUTHENTICATION_FAILED, _("Authentication failed"));
 			break;
 		}
@@ -1434,7 +1426,6 @@ purple_parse_auth_securid_request_no_cb(
 	PurpleConnection *gc = user_data;
 
 	/* Disconnect */
-	gc->wants_to_die = TRUE;
 	purple_connection_error_reason(gc, PURPLE_REASON_AUTHENTICATION_FAILED,
 		_("The SecurID key entered is invalid."));
 }
============================================================
--- libpurple/protocols/qq/login_logout.c	970cd189e14b0dab253fcb8fb3644a27ee601d92
+++ libpurple/protocols/qq/login_logout.c	870770b590aecf1026ae7401753a94d9513bb0be
@@ -479,7 +479,6 @@ void qq_process_login_reply(guint8 *buf,
 
 	switch (ret) {
 	case QQ_LOGIN_REPLY_PWD_ERROR:
-		gc->wants_to_die = TRUE;
 		if (!purple_account_get_remember_password(gc->account))
 			purple_account_set_password(gc->account, NULL);
 		purple_connection_error_reason(gc,
============================================================
--- libpurple/protocols/sametime/sametime.c	74a86017c333ebbd8f17a7e5d425551d1fcf9524
+++ libpurple/protocols/sametime/sametime.c	f867b61b61782545fabd4258f80160e10f3fa51c
@@ -1563,14 +1563,12 @@ static void mw_session_stateChange(struc
       case INCORRECT_LOGIN:
       case USER_UNREGISTERED:
       case GUEST_IN_USE:
-        gc->wants_to_die = TRUE;
         reason = PURPLE_REASON_AUTHENTICATION_FAILED;
         break;
 
       case ENCRYPT_MISMATCH:
       case ERR_ENCRYPT_NO_SUPPORT:
       case ERR_NO_COMMON_ENCRYPT:
-        gc->wants_to_die = TRUE;
         reason = PURPLE_REASON_ENCRYPTION_ERROR;
         break;
 
@@ -1580,7 +1578,6 @@ static void mw_session_stateChange(struc
 
       case MULTI_SERVER_LOGIN:
       case MULTI_SERVER_LOGIN2:
-        gc->wants_to_die = TRUE;
         reason = PURPLE_REASON_NAME_IN_USE;
         break;
 
@@ -3649,7 +3646,6 @@ static void prompt_host_cancel_cb(Purple
 
 static void prompt_host_cancel_cb(PurpleConnection *gc) {
   const char *msg = _("No Sametime Community Server specified");
-  gc->wants_to_die = TRUE;
   purple_connection_error_reason(gc, PURPLE_REASON_INVALID_SETTINGS, msg);
 }
 
============================================================
--- libpurple/protocols/silc/silc.c	a62bcac2f60edc43aceec8343bc1458f2abf0957
+++ libpurple/protocols/silc/silc.c	666df1b86ec209ccfa862d0f5959de93dd725b74
@@ -229,19 +229,16 @@ silcpurple_connect_cb(SilcClient client,
 		break;
 
 	case SILC_CLIENT_CONN_ERROR_KE:
-		gc->wants_to_die = TRUE;
 		purple_connection_error_reason(gc, PURPLE_REASON_ENCRYPTION_ERROR,
 		                             _("Key Exchange failed"));
 		break;
 
 	case SILC_CLIENT_CONN_ERROR_AUTH:
-		gc->wants_to_die = TRUE;
 		purple_connection_error_reason(gc, PURPLE_REASON_AUTHENTICATION_FAILED,
 		                             _("Authentication failed"));
 		break;
 
 	case SILC_CLIENT_CONN_ERROR_RESUME:
-		gc->wants_to_die = TRUE;
 		purple_connection_error_reason(gc, PURPLE_REASON_OTHER_ERROR,
 		                             _("Resuming detached session failed. "
 		                               "Press Reconnect to create new connection."));
@@ -360,7 +357,6 @@ static void silcpurple_running(SilcClien
 				(char *)purple_account_get_string(account, "private-key", prd),
 				(gc->password == NULL) ? "" : gc->password,
 				&sg->public_key, &sg->private_key)) {
-		gc->wants_to_die = TRUE;
 		purple_connection_error_reason(gc, PURPLE_REASON_OTHER_ERROR,
 		                             _("Could not load SILC key pair"));
 		gc->proto_data = NULL;
@@ -448,7 +444,6 @@ silcpurple_login(PurpleAccount *account)
 	/* Init SILC client */
 	if (!silc_client_init(client, username, hostname, realname,
 			      silcpurple_running, account)) {
-		gc->wants_to_die = TRUE;
 		purple_connection_error_reason(gc, PURPLE_REASON_OTHER_ERROR,
 		                             _("Cannot initialize SILC protocol"));
 		return;
@@ -456,7 +451,6 @@ silcpurple_login(PurpleAccount *account)
 
 	/* Check the ~/.silc dir and create it, and new key pair if necessary. */
 	if (!silcpurple_check_silc_dir(gc)) {
-		gc->wants_to_die = TRUE;
 		purple_connection_error_reason(gc, PURPLE_REASON_OTHER_ERROR,
 		                             _("Error loading SILC key pair"));
 		return;
============================================================
--- libpurple/protocols/simple/simple.c	663b0b2a2a05f3c609b0045a239630066a4cfb13
+++ libpurple/protocols/simple/simple.c	c95fcc1223b9e505625f9c0f4570a6bd2b62b751
@@ -1042,8 +1042,6 @@ gboolean process_register_response(struc
 			if(sip->registerstatus != SIMPLE_REGISTER_RETRY) {
 				purple_debug_info("simple", "REGISTER retries %d\n", sip->registrar.retries);
 				if(sip->registrar.retries > SIMPLE_REGISTER_RETRY_MAX) {
-					purple_debug_info("simple", "Setting wants_to_die to true.\n");
-					sip->gc->wants_to_die = TRUE;
 					if (!purple_account_get_remember_password(sip->gc->account))
 						purple_account_set_password(sip->gc->account, NULL);
 					purple_connection_error_reason(sip->gc,
@@ -1061,7 +1059,6 @@ gboolean process_register_response(struc
 			if (sip->registerstatus != SIMPLE_REGISTER_RETRY) {
 				purple_debug_info("simple", "Unrecognized return code for REGISTER.\n");
 				if (sip->registrar.retries > SIMPLE_REGISTER_RETRY_MAX) {
-					sip->gc->wants_to_die = TRUE;
 					purple_connection_error_reason(sip->gc, PURPLE_REASON_OTHER_ERROR,
 						_("Unknown server response."));
 					return TRUE;
@@ -1709,7 +1706,6 @@ static void simple_login(PurpleAccount *
 	gc = purple_account_get_connection(account);
 
 	if (strpbrk(username, " \t\v\r\n") != NULL) {
-		gc->wants_to_die = TRUE;
 		purple_connection_error_reason(gc, PURPLE_REASON_INVALID_SETTINGS,
 			_("SIP screen names may not contain whitespaces or @ symbols"));
 		return;
============================================================
--- libpurple/protocols/yahoo/yahoo.c	45eac25a43b917c16da4e42c4fdf0881bd6808ba
+++ libpurple/protocols/yahoo/yahoo.c	838c233654920c67deec93bfa9a67d71b0d7d2b9
@@ -201,7 +201,6 @@ static void yahoo_process_status(PurpleC
 	char *message = NULL;
 
 	if (pkt->service == YAHOO_SERVICE_LOGOFF && pkt->status == -1) {
-		gc->wants_to_die = TRUE;
 		if (!purple_account_get_remember_password(account))
 			purple_account_set_password(account, NULL);
 		purple_connection_error_reason(gc, PURPLE_REASON_NAME_IN_USE,
@@ -2140,7 +2139,6 @@ static void yahoo_process_authresp(Purpl
 	else
 		fullmsg = g_strdup(msg);
 
-	gc->wants_to_die = TRUE;
 	purple_connection_error_reason(gc, PURPLE_REASON_AUTHENTICATION_FAILED, fullmsg);
 	g_free(msg);
 	g_free(fullmsg);


More information about the Commits mailing list