Show different message when disconnected

Also show message in active chat windows
This commit is contained in:
James Booth
2012-04-19 21:03:48 +01:00
parent 2514be4b78
commit 9805b2b2b2
3 changed files with 27 additions and 1 deletions

View File

@@ -221,7 +221,12 @@ static void _jabber_conn_handler(xmpp_conn_t * const conn,
jabber_conn.conn_status = JABBER_CONNECTED;
}
else {
cons_bad_show("Login failed.");
if (jabber_conn.conn_status == JABBER_CONNECTED) {
cons_bad_show("Lost connection.");
win_disconnected();
} else {
cons_bad_show("Login failed.");
}
win_page_off();
log_msg(CONN, "disconnected");
xmpp_stop(ctx);