Mercurial > pidgin
changeset 18609:2774acdb1cff
Move a call to purple_connection_error() from oscar.c to
flap_connection.c, where it makes more sense.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 22 Jul 2007 08:28:55 +0000 |
parents | a244c34ce59c |
children | e333072d8680 |
files | libpurple/protocols/oscar/flap_connection.c libpurple/protocols/oscar/oscar.c |
diffstat | 2 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/oscar/flap_connection.c Sun Jul 22 08:18:27 2007 +0000 +++ b/libpurple/protocols/oscar/flap_connection.c Sun Jul 22 08:28:55 2007 +0000 @@ -380,7 +380,10 @@ { /* No more FLAP connections! Sign off this PurpleConnection! */ gchar *tmp; - if (conn->disconnect_reason == OSCAR_DISCONNECT_REMOTE_CLOSED) + if (conn->disconnect_code == 0x0001) { + 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) tmp = g_strdup(_("Server closed the connection.")); else if (conn->disconnect_reason == OSCAR_DISCONNECT_LOST_CONNECTION) tmp = g_strdup_printf(_("Lost connection with server:\n%s"),
--- a/libpurple/protocols/oscar/oscar.c Sun Jul 22 08:18:27 2007 +0000 +++ b/libpurple/protocols/oscar/oscar.c Sun Jul 22 08:28:55 2007 +0000 @@ -3474,15 +3474,7 @@ g_return_val_if_fail(conn != NULL, 1); - if (conn->type == SNAC_FAMILY_LOCATE) { - if (code == 0x0001) { - gc->wants_to_die = TRUE; - purple_connection_error(gc, _("You have signed on from another location.")); - } else { - purple_connection_error(gc, _("You have been signed off for an unknown reason.")); - } - od->killme = TRUE; - } else if (conn->type == SNAC_FAMILY_CHAT) { + if (conn->type == SNAC_FAMILY_CHAT) { struct chat_connection *cc; PurpleConversation *conv; @@ -3491,6 +3483,11 @@ if (conv != NULL) { + /* + * TOOD: Have flap_connection_destroy_cb() send us the + * error message stored in 'tmp', which should be + * human-friendly, and print that to the chat room. + */ gchar *buf; buf = g_strdup_printf(_("You have been disconnected from chat " "room %s."), cc->name);