diff libpurple/protocols/oscar/flap_connection.c @ 20124:05726ea2dd89

Add disconnection reasons to oscar.
author Will Thompson <will.thompson@collabora.co.uk>
date Mon, 01 Oct 2007 16:07:14 +0000
parents 44b4e8bd759b
children f3cfcbbac3d8
line wrap: on
line diff
--- a/libpurple/protocols/oscar/flap_connection.c	Mon Oct 01 14:54:31 2007 +0000
+++ b/libpurple/protocols/oscar/flap_connection.c	Mon Oct 01 16:07:14 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."));
 			od->gc->wants_to_die = TRUE;
 		} else if (conn->disconnect_reason == OSCAR_DISCONNECT_REMOTE_CLOSED)
@@ -402,7 +405,7 @@
 
 		if (tmp != NULL)
 		{
-			purple_connection_error(od->gc, tmp);
+			purple_connection_error_reason(od->gc, reason, tmp);
 			g_free(tmp);
 		}
 	}