Mercurial > pidgin.yaz
diff libpurple/protocols/msn/directconn.c @ 21000:89c7be36fd61
propagate from branch 'im.pidgin.pidgin.2.2.2' (head 0adab134b7a42e144aee3ac60d825db1f28a42a4)
to branch 'im.pidgin.pidgin' (head 4e59fcb1e2baf2eb63083224381e0af9fe1331cc)
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 23 Oct 2007 17:27:12 +0000 |
parents | 04fe5601fedb d9cbd249619b |
children | 3225c99785b8 |
line wrap: on
line diff
--- a/libpurple/protocols/msn/directconn.c Tue Oct 23 17:05:12 2007 +0000 +++ b/libpurple/protocols/msn/directconn.c Tue Oct 23 17:27:12 2007 +0000 @@ -76,7 +76,6 @@ * Connection Functions **************************************************************************/ -#if 0 static int create_listener(int port) { @@ -162,7 +161,6 @@ return fd; } -#endif static size_t msn_directconn_write(MsnDirectConn *directconn, @@ -290,6 +288,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; @@ -304,6 +307,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; @@ -350,17 +358,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; @@ -440,7 +453,6 @@ return (directconn->connect_data != NULL); } -#if 0 void msn_directconn_listen(MsnDirectConn *directconn) { @@ -460,7 +472,6 @@ directconn->port = port; directconn->c = 0; } -#endif MsnDirectConn* msn_directconn_new(MsnSlpLink *slplink)