Mercurial > pidgin
diff libpurple/protocols/msn/directconn.c @ 20517:2ebde8bd0e58
explicit merge of '7ca52e5d60c8f4d7842faad73378b57df9db9007'
and 'b1148e355b30c726e5fdcc11dc57ddb0cc8736ea'
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 16 Sep 2007 18:06:22 +0000 |
parents | 723b5a2f91ce |
children | 7c30d5aa5e01 |
line wrap: on
line diff
--- a/libpurple/protocols/msn/directconn.c Tue Sep 11 13:48:19 2007 +0000 +++ b/libpurple/protocols/msn/directconn.c Sun Sep 16 18:06:22 2007 +0000 @@ -76,7 +76,6 @@ * Connection Functions **************************************************************************/ -#if 0 static int create_listener(int port) { @@ -160,7 +159,6 @@ return fd; } -#endif static size_t msn_directconn_write(MsnDirectConn *directconn, @@ -288,6 +286,11 @@ /* ERROR */ purple_debug_error("msn", "error reading\n"); + if (directconn->inpa) + purple_input_remove(directconn->inpa); + + close(directconn->fd); + msn_directconn_destroy(directconn); return; @@ -302,6 +305,11 @@ /* ERROR */ purple_debug_error("msn", "error reading\n"); + if (directconn->inpa) + purple_input_remove(directconn->inpa); + + close(directconn->fd); + msn_directconn_destroy(directconn); return; @@ -348,17 +356,22 @@ /* ERROR */ purple_debug_error("msn", "error reading\n"); + if (directconn->inpa) + purple_input_remove(directconn->inpa); + + close(directconn->fd); + msn_directconn_destroy(directconn); } } static void -connect_cb(gpointer data, gint source, const gchar *error_message) +connect_cb(gpointer data, gint source, PurpleInputCondition cond) { MsnDirectConn* directconn; int fd; - purple_debug_misc("msn", "directconn: connect_cb: %d\n", source); + purple_debug_misc("msn", "directconn: connect_cb: %d, %d.\n", source, cond); directconn = data; directconn->connect_data = NULL; @@ -434,7 +447,6 @@ return FALSE; } -#if 0 void msn_directconn_listen(MsnDirectConn *directconn) { @@ -454,7 +466,6 @@ directconn->port = port; directconn->c = 0; } -#endif MsnDirectConn* msn_directconn_new(MsnSlpLink *slplink)