# HG changeset patch # User Elliott Sales de Andrade # Date 1271665625 0 # Node ID c73a650f952a6cc3378beae7be0c93cabda5aca7 # Parent 5be6177e369e867a0dcbd0345429c512a8ae4a5d Remove one more unused code block, and unnecessary variable. diff -r 5be6177e369e -r c73a650f952a libpurple/protocols/msn/slp.c --- a/libpurple/protocols/msn/slp.c Mon Apr 19 08:20:24 2010 +0000 +++ b/libpurple/protocols/msn/slp.c Mon Apr 19 08:27:05 2010 +0000 @@ -204,34 +204,6 @@ * SLP Control **************************************************************************/ -#if 0 -static void -got_transresp(MsnSlpCall *slpcall, const char *nonce, - const char *ips_str, int port) -{ - MsnDirectConn *directconn; - char **ip_addrs, **c; - - directconn = msn_directconn_new(slpcall->slplink); - - directconn->initial_call = slpcall; - - /* msn_directconn_parse_nonce(directconn, nonce); */ - directconn->nonce = g_strdup(nonce); - - ip_addrs = g_strsplit(ips_str, " ", -1); - - for (c = ip_addrs; *c != NULL; c++) - { - purple_debug_info("msn", "ip_addr = %s\n", *c); - if (msn_directconn_connect(directconn, *c, port)) - break; - } - - g_strfreev(ip_addrs); -} -#endif - void msn_slp_send_ok(MsnSlpCall *slpcall, const char *branch, const char *type, const char *content) @@ -671,12 +643,11 @@ return; bridges = get_token(content, "Bridges: ", "\r\n"); - if(bridges && strstr(bridges, "TCPv1") != NULL) { + if (bridges && strstr(bridges, "TCPv1") != NULL) { /* * Ok, the client supports direct TCP connection * Try to create a listening port */ - char *content; MsnDirectConn *dc; dc = msn_dc_new(slpcall); @@ -693,15 +664,12 @@ purple_debug_info("msn", "got_invite: listening failed\n"); - content = g_strdup( + msn_slp_send_ok(slpcall, branch, + "application/x-msnmsgr-transrespbody", "Bridge: TCPv1\r\n" "Listening: false\r\n" "Hashed-Nonce: {00000000-0000-0000-0000-000000000000}\r\n" - "\r\n" - ); - msn_slp_send_ok(slpcall, branch, - "application/x-msnmsgr-transrespbody", content); - g_free(content); + "\r\n"); } else { /*