Mercurial > pidgin
changeset 30047:6936ffd13cb9
Make msn_dc_fallback_to_p2p non-static, and remove some old code.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Wed, 05 May 2010 07:26:57 +0000 |
parents | e471c1fb9c49 |
children | b491612862dc |
files | libpurple/protocols/msn/directconn.c libpurple/protocols/msn/directconn.h |
diffstat | 2 files changed, 9 insertions(+), 39 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/directconn.c Wed May 05 07:15:55 2010 +0000 +++ b/libpurple/protocols/msn/directconn.c Wed May 05 07:26:57 2010 +0000 @@ -313,11 +313,10 @@ msn_slplink_send_queued_slpmsgs(dc->slpcall->slplink); } -static void +void msn_dc_fallback_to_p2p(MsnDirectConn *dc) { MsnSlpCall *slpcall; - PurpleXfer *xfer; purple_debug_info("msn", "msn_dc_try_fallback_to_p2p %p\n", dc); @@ -326,46 +325,9 @@ slpcall = dc->slpcall; g_return_if_fail(slpcall != NULL); - xfer = slpcall->xfer; - g_return_if_fail(xfer != NULL); - msn_dc_destroy(dc); msn_slpcall_session_init(slpcall); - - /* - switch (purple_xfer_get_status(xfer)) { - case PURPLE_XFER_STATUS_NOT_STARTED: - case PURPLE_XFER_STATUS_ACCEPTED: - msn_slpcall_session_init(slpcall); - break; - - case PURPLE_XFER_STATUS_STARTED: - slpcall->session_init_cb = NULL; - slpcall->end_cb = NULL; - slpcall->progress_cb = NULL; - slpcall->cb = NULL; - - if (fail_local) - purple_xfer_cancel_local(xfer); - else - purple_xfer_cancel_remote(xfer); - break; - - default: - slpcall->session_init_cb = NULL; - slpcall->end_cb = NULL; - slpcall->progress_cb = NULL; - slpcall->cb = NULL; - - if (fail_local) - purple_xfer_cancel_local(xfer); - else - purple_xfer_cancel_remote(xfer); - - break; - } - */ } static void
--- a/libpurple/protocols/msn/directconn.h Wed May 05 07:15:55 2010 +0000 +++ b/libpurple/protocols/msn/directconn.h Wed May 05 07:26:57 2010 +0000 @@ -55,6 +55,7 @@ typedef enum { + DC_NONCE_UNKNOWN, /**< Invalid scheme */ DC_NONCE_PLAIN, /**< No hashing */ DC_NONCE_SHA1 /**< First 16 bytes of SHA1 of nonce */ @@ -136,6 +137,13 @@ msn_dc_destroy(MsnDirectConn *dc); /* + * Fallback to switchboard connection. Used when neither side is able to + * create a listening socket. + */ +void +msn_dc_fallback_to_p2p(MsnDirectConn *dc); + +/* * Increases the slpcall counter in DC. The direct connection remains open * until all slpcalls using it are destroyed. */