libpurple/protocols/oscar/flap_connection.c

branch
cpw.resiak.disconnectreason
changeset 20853
2637f895b850
parent 20658
91594d39738c
parent 20452
a9fc6198b5c6
child 21152
2357a7a795eb
--- a/libpurple/protocols/oscar/flap_connection.c	Thu Oct 04 03:52:47 2007 +0000
+++ b/libpurple/protocols/oscar/flap_connection.c	Fri Oct 05 15:50:17 2007 +0000
@@ -380,7 +380,10 @@
 	{
 		/* No more FLAP connections!  Sign off this PurpleConnection! */
 		gchar *tmp;
+		PurpleDisconnectReason reason = PURPLE_REASON_NETWORK_ERROR;
+
 		if (conn->disconnect_code == 0x0001) {
+			reason = PURPLE_REASON_NAME_IN_USE;
 			tmp = g_strdup(_("You have signed on from another location."));
 			if (!purple_account_get_remember_password(account))
 				purple_account_set_password(account, NULL);
@@ -404,7 +407,7 @@
 
 		if (tmp != NULL)
 		{
-			purple_connection_error(od->gc, tmp);
+			purple_connection_error_reason(od->gc, reason, tmp);
 			g_free(tmp);
 		}
 	}

mercurial