Mercurial > pidgin.yaz
diff src/protocols/oscar/peer.c @ 13608:6c34fbb75bbd
[gaim-migrate @ 15994]
Disconnect the account with a decent error message when there are
problems with an oscar FLAP connection. This needed to be added
after I removed it when rewriting things for non-blocking I/O.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 10 Apr 2006 03:37:37 +0000 |
parents | 6519aeb66b31 |
children | 4132d997ccec |
line wrap: on
line diff
--- a/src/protocols/oscar/peer.c Mon Apr 10 02:47:43 2006 +0000 +++ b/src/protocols/oscar/peer.c Mon Apr 10 03:37:37 2006 +0000 @@ -191,8 +191,8 @@ (status != GAIM_XFER_STATUS_CANCEL_LOCAL) && (status != GAIM_XFER_STATUS_CANCEL_REMOTE)) { - if ((conn->disconnect_reason == PEER_DISCONNECT_REMOTE_CLOSED) || - (conn->disconnect_reason == PEER_DISCONNECT_REMOTE_REFUSED)) + if ((conn->disconnect_reason == OSCAR_DISCONNECT_REMOTE_CLOSED) || + (conn->disconnect_reason == OSCAR_DISCONNECT_REMOTE_REFUSED)) gaim_xfer_cancel_remote(conn->xfer); else gaim_xfer_cancel_local(conn->xfer); @@ -214,7 +214,7 @@ } void -peer_connection_destroy(PeerConnection *conn, PeerDisconnectReason reason) +peer_connection_destroy(PeerConnection *conn, OscarDisconnectReason reason) { conn->disconnect_reason = reason; if (conn->destroy_timeout != 0) @@ -223,7 +223,7 @@ } void -peer_connection_schedule_destroy(PeerConnection *conn, PeerDisconnectReason reason) +peer_connection_schedule_destroy(PeerConnection *conn, OscarDisconnectReason reason) { if (conn->destroy_timeout != 0) /* Already taken care of */ @@ -271,7 +271,7 @@ /* Check if the remote user closed the connection */ if (read == 0) { - peer_connection_destroy(conn, PEER_DISCONNECT_REMOTE_CLOSED); + peer_connection_destroy(conn, OSCAR_DISCONNECT_REMOTE_CLOSED); return; } @@ -282,7 +282,7 @@ /* No worries */ return; - peer_connection_destroy(conn, PEER_DISCONNECT_LOST_CONNECTION); + peer_connection_destroy(conn, OSCAR_DISCONNECT_LOST_CONNECTION); return; } @@ -303,7 +303,7 @@ "Closing connection.\n", conn->magic[0], conn->magic[1], conn->magic[2], conn->magic[3], header[0], header[1], header[2], header[3]); - peer_connection_destroy(conn, PEER_DISCONNECT_INVALID_DATA); + peer_connection_destroy(conn, OSCAR_DISCONNECT_INVALID_DATA); return; } @@ -322,7 +322,7 @@ /* Check if the remote user closed the connection */ if (read == 0) { - peer_connection_destroy(conn, PEER_DISCONNECT_REMOTE_CLOSED); + peer_connection_destroy(conn, OSCAR_DISCONNECT_REMOTE_CLOSED); return; } @@ -332,7 +332,7 @@ /* No worries */ return; - peer_connection_destroy(conn, PEER_DISCONNECT_LOST_CONNECTION); + peer_connection_destroy(conn, OSCAR_DISCONNECT_LOST_CONNECTION); return; } @@ -389,7 +389,7 @@ return; if (conn->ready) - peer_connection_schedule_destroy(conn, PEER_DISCONNECT_LOST_CONNECTION); + peer_connection_schedule_destroy(conn, OSCAR_DISCONNECT_LOST_CONNECTION); else { /* @@ -764,7 +764,7 @@ g_free(new_conn_data); /* Give up! */ - peer_connection_destroy(conn, PEER_DISCONNECT_COULD_NOT_CONNECT); + peer_connection_destroy(conn, OSCAR_DISCONNECT_COULD_NOT_CONNECT); } /** @@ -798,7 +798,7 @@ } /* Cancel the old connection and try again */ - peer_connection_destroy(conn, PEER_DISCONNECT_RETRYING); + peer_connection_destroy(conn, OSCAR_DISCONNECT_RETRYING); } } @@ -841,7 +841,7 @@ aim_im_denytransfer(conn->od, conn->sn, conn->cookie, AIM_TRANSFER_DENY_DECLINE); - peer_connection_destroy(conn, PEER_DISCONNECT_LOCAL_CLOSED); + peer_connection_destroy(conn, OSCAR_DISCONNECT_LOCAL_CLOSED); } /** @@ -894,7 +894,7 @@ /* Close the old direct IM and start a new one */ gaim_debug_info("oscar", "Received new direct IM request " "from %s. Destroying old connection.\n", sn); - peer_connection_destroy(conn, PEER_DISCONNECT_REMOTE_CLOSED); + peer_connection_destroy(conn, OSCAR_DISCONNECT_REMOTE_CLOSED); } }