# HG changeset patch # User Eric Warmenhoven # Date 984481513 0 # Node ID e9faf5dfdba032c24adbd1b8e5ed7b7f176b0131 # Parent 2c66d386be90cc3ff347eaacf03676a1c5c09c5b [gaim-migrate @ 1576] if not connected and disconnect remove WRITE instead of READ committer: Tailor Script diff -r 2c66d386be90 -r e9faf5dfdba0 plugins/yay/conn.c --- a/plugins/yay/conn.c Tue Mar 13 10:05:45 2001 +0000 +++ b/plugins/yay/conn.c Tue Mar 13 11:05:13 2001 +0000 @@ -196,8 +196,12 @@ if (!g_list_find(session->connlist, conn)) return; - if (yahoo_socket_notify) - (*yahoo_socket_notify)(session, conn->socket, YAHOO_SOCKET_READ, FALSE); + if (yahoo_socket_notify) { + if (conn->connected) + (*yahoo_socket_notify)(session, conn->socket, YAHOO_SOCKET_READ, FALSE); + else + (*yahoo_socket_notify)(session, conn->socket, YAHOO_SOCKET_WRITE, FALSE); + } close(conn->socket); session->connlist = g_list_remove(session->connlist, conn); diff -r 2c66d386be90 -r e9faf5dfdba0 plugins/yay/internal.h --- a/plugins/yay/internal.h Tue Mar 13 10:05:45 2001 +0000 +++ b/plugins/yay/internal.h Tue Mar 13 11:05:13 2001 +0000 @@ -36,6 +36,7 @@ int type; int socket; int magic_id; + gboolean connected; char *txqueue; }; diff -r 2c66d386be90 -r e9faf5dfdba0 plugins/yay/rxhandlers.c --- a/plugins/yay/rxhandlers.c Tue Mar 13 10:05:45 2001 +0000 +++ b/plugins/yay/rxhandlers.c Tue Mar 13 11:05:13 2001 +0000 @@ -246,6 +246,7 @@ YAHOO_PRINT(session, YAHOO_LOG_NOTICE, "connected"); + conn->connected = TRUE; if (yahoo_socket_notify) (*yahoo_socket_notify)(session, socket, YAHOO_SOCKET_WRITE, FALSE); if (yahoo_socket_notify)