Mercurial > pidgin.yaz
comparison src/protocols/yahoo/conn.c @ 2145:91223be78b70
[gaim-migrate @ 2155]
thanks to Valdis Kletnieks for pointing this out.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 15 Aug 2001 19:23:03 +0000 |
parents | 424a40f12a6c |
children | f89313102962 |
comparison
equal
deleted
inserted
replaced
2144:a9940cdb86ee | 2145:91223be78b70 |
---|---|
17 * along with this program; if not, write to the Free Software | 17 * along with this program; if not, write to the Free Software |
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 * | 19 * |
20 */ | 20 */ |
21 | 21 |
22 #include <string.h> | |
22 #include "internal.h" | 23 #include "internal.h" |
23 | 24 |
24 void (*yahoo_socket_notify)(struct yahoo_session *, int, int, gboolean) = NULL; | 25 void (*yahoo_socket_notify)(struct yahoo_session *, int, int, gboolean) = NULL; |
25 void (*yahoo_print)(struct yahoo_session *, int, const char *) = NULL; | 26 void (*yahoo_print)(struct yahoo_session *, int, const char *) = NULL; |
26 int (*yahoo_connector)(struct yahoo_session *, const char *, int, gpointer) = NULL; | 27 int (*yahoo_connector)(struct yahoo_session *, const char *, int, gpointer) = NULL; |
95 YAHOO_PRINT(session, YAHOO_LOG_NOTICE, "connect succeeded"); | 96 YAHOO_PRINT(session, YAHOO_LOG_NOTICE, "connect succeeded"); |
96 conn->socket = fd; | 97 conn->socket = fd; |
97 conn->connected = TRUE; | 98 conn->connected = TRUE; |
98 if (conn->type == YAHOO_CONN_TYPE_AUTH) { | 99 if (conn->type == YAHOO_CONN_TYPE_AUTH) { |
99 if (session->callbacks[YAHOO_HANDLE_AUTHCONNECT].function) | 100 if (session->callbacks[YAHOO_HANDLE_AUTHCONNECT].function) |
100 (*session->callbacks[YAHOO_HANDLE_AUTHCONNECT].function)(session); | 101 if (!(*session->callbacks[YAHOO_HANDLE_AUTHCONNECT].function)(session)) |
102 return 0; | |
101 } else if (conn->type == YAHOO_CONN_TYPE_MAIN) { | 103 } else if (conn->type == YAHOO_CONN_TYPE_MAIN) { |
102 if (session->callbacks[YAHOO_HANDLE_MAINCONNECT].function) | 104 if (session->callbacks[YAHOO_HANDLE_MAINCONNECT].function) |
103 (*session->callbacks[YAHOO_HANDLE_MAINCONNECT].function)(session); | 105 if (!(*session->callbacks[YAHOO_HANDLE_MAINCONNECT].function)(session)) |
106 return 0; | |
104 } else if (conn->type == YAHOO_CONN_TYPE_DUMB) { | 107 } else if (conn->type == YAHOO_CONN_TYPE_DUMB) { |
105 YAHOO_PRINT(session, YAHOO_LOG_DEBUG, "sending to buddy list host"); | 108 YAHOO_PRINT(session, YAHOO_LOG_DEBUG, "sending to buddy list host"); |
106 yahoo_write(session, conn, conn->txqueue, strlen(conn->txqueue)); | 109 yahoo_write(session, conn, conn->txqueue, strlen(conn->txqueue)); |
107 g_free(conn->txqueue); | 110 g_free(conn->txqueue); |
108 conn->txqueue = NULL; | 111 conn->txqueue = NULL; |