# HG changeset patch # User Mark Doliner # Date 1185092935 0 # Node ID 2774acdb1cff7d64b0670d823c8e09c8dc4b1dd8 # Parent a244c34ce59ce7d2d8f69ea65ae3441daa74e08a Move a call to purple_connection_error() from oscar.c to flap_connection.c, where it makes more sense. diff -r a244c34ce59c -r 2774acdb1cff libpurple/protocols/oscar/flap_connection.c --- 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"), diff -r a244c34ce59c -r 2774acdb1cff libpurple/protocols/oscar/oscar.c --- 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);