Mercurial > pidgin
changeset 1531:e06dcc3025a9
[gaim-migrate @ 1541]
updates to icqlib; don't pay attention to exception; my patch for handling hangups. other minor details.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sun, 04 Mar 2001 02:26:32 +0000 |
parents | 0b6e4d52de63 |
children | 249a770bebd7 |
files | plugins/icq/ChangeLog plugins/icq/chatsession.c plugins/icq/filesession.c plugins/icq/gaim_icq.c plugins/icq/icq.h plugins/icq/tcplink.c |
diffstat | 6 files changed, 37 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/icq/ChangeLog Sun Mar 04 01:00:08 2001 +0000 +++ b/plugins/icq/ChangeLog Sun Mar 04 02:26:32 2001 +0000 @@ -1,3 +1,12 @@ +2001-03-03 Bill Soudan <soudan@kde.org> + + * icqlib/chatsession.c, icqlib/filesession.c, icqlib/icq.h.in: + add user_data member to icq_ChatSession and icq_FileSession + + * icqlib/icq.h.in, icqlib/tcplink.c: add compile fix for BeOS + + * README.BeOS: added + 2001-03-01 Bill Soudan <soudan@kde.org> This should fix all problems introduced by my 02-22 commit.
--- a/plugins/icq/chatsession.c Sun Mar 04 01:00:08 2001 +0000 +++ b/plugins/icq/chatsession.c Sun Mar 04 02:26:32 2001 +0000 @@ -17,6 +17,7 @@ p->id=0L; p->icqlink=icqlink; p->tcplink=NULL; + p->user_data=NULL; list_insert(icqlink->d->icq_ChatSessions, 0, p); }
--- a/plugins/icq/filesession.c Sun Mar 04 01:00:08 2001 +0000 +++ b/plugins/icq/filesession.c Sun Mar 04 02:26:32 2001 +0000 @@ -38,6 +38,7 @@ p->total_files=0; p->total_transferred_bytes=0; p->working_dir[0]=0; + p->user_data=NULL; list_insert(icqlink->d->icq_FileSessions, 0, p); }
--- a/plugins/icq/gaim_icq.c Sun Mar 04 01:00:08 2001 +0000 +++ b/plugins/icq/gaim_icq.c Sun Mar 04 02:26:32 2001 +0000 @@ -52,11 +52,12 @@ GList *sockets = NULL; struct gaim_sock { int socket; + int type; gint inpa; }; static void gaim_icq_handler(gpointer data, gint source, GdkInputCondition cond) { - if ((cond & GDK_INPUT_READ) || (cond & GDK_INPUT_EXCEPTION)) + if (cond & GDK_INPUT_READ) icq_HandleReadySocket(source, ICQ_SOCKET_READ); if (cond & GDK_INPUT_WRITE) icq_HandleReadySocket(source, ICQ_SOCKET_WRITE); @@ -67,24 +68,27 @@ if (status) { GdkInputCondition cond; if (type == ICQ_SOCKET_READ) - cond = GDK_INPUT_READ | GDK_INPUT_EXCEPTION; + cond = GDK_INPUT_READ; else - cond = GDK_INPUT_WRITE | GDK_INPUT_EXCEPTION; + cond = GDK_INPUT_WRITE; gs = g_new0(struct gaim_sock, 1); gs->socket = socket; + gs->type = type; gs->inpa = gdk_input_add(socket, cond, gaim_icq_handler, NULL); sockets = g_list_append(sockets, gs); + debug_printf("Adding socket notifier: %d %d (%d)\n", socket, type, gs->inpa); } else { GList *m = sockets; while (m) { gs = m->data; - if (gs->socket == socket) + if ((gs->socket == socket) && (gs->type == type)) break; m = g_list_next(m); } if (m) { gdk_input_remove(gs->inpa); sockets = g_list_remove(sockets, gs); + debug_printf("Removing socket notifier: %d %d (%d)\n", socket, type, gs->inpa); g_free(gs); } }
--- a/plugins/icq/icq.h Sun Mar 04 01:00:08 2001 +0000 +++ b/plugins/icq/icq.h Sun Mar 04 02:26:32 2001 +0000 @@ -14,6 +14,10 @@ #include <winsock.h> #endif /* _WIN32 */ +#ifdef __BEOS__ +#include <socket.h> +#endif + #include <time.h> /* ICQLIB version defines */ @@ -260,7 +264,7 @@ struct icq_link_private *d; /** Space for user data */ - void* icq_UserData; + void *icq_UserData; } ICQLINK; extern int icq_Russian; @@ -516,6 +520,8 @@ /** Remote uin's chat handle. */ char remote_handle[64]; + /** Space for user data */ + void *user_data; }; void icq_ChatSessionClose(icq_ChatSession *session); @@ -572,6 +578,8 @@ int current_speed; + /** Space for user data */ + void *user_data; }; icq_FileSession *icq_AcceptFileRequest(ICQLINK *link, unsigned long uin,
--- a/plugins/icq/tcplink.c Sun Mar 04 01:00:08 2001 +0000 +++ b/plugins/icq/tcplink.c Sun Mar 04 02:26:32 2001 +0000 @@ -1,9 +1,12 @@ /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -$Id: tcplink.c 1508 2001-02-22 23:07:34Z warmenhoven $ +$Id: tcplink.c 1541 2001-03-04 02:26:32Z warmenhoven $ $Log$ -Revision 1.4 2001/02/22 23:07:34 warmenhoven -updating icqlib +Revision 1.5 2001/03/04 02:26:32 warmenhoven +updates to icqlib; don't pay attention to exception; my patch for handling hangups. other minor details. + +Revision 1.45 2001/03/03 20:13:06 bills +add compile fix for BeOS Revision 1.44 2001/02/22 05:40:04 bills port tcp connect timeout code and UDP queue to new timeout manager @@ -815,7 +818,7 @@ } while (recv_result > 0); - if (recv_result < 0 && errno!=EWOULDBLOCK) { + if (recv_result <= 0 && errno!=EWOULDBLOCK) { /* receive error - log it */ icq_FmtLog(plink->icqlink, ICQ_LOG_WARNING, "recv failed from %d (%d-%s)," @@ -858,11 +861,13 @@ /* check getsockopt */ len=sizeof(error); +#ifndef __BEOS__ #ifdef _WIN32 getsockopt(plink->socket, SOL_SOCKET, SO_ERROR, (char *)&error, &len); #else getsockopt(plink->socket, SOL_SOCKET, SO_ERROR, &error, &len); #endif +#endif if(!error && (plink->mode & (TCP_LINK_SOCKS_CONNECTING | TCP_LINK_SOCKS_AUTHORIZATION | TCP_LINK_SOCKS_AUTHSTATUS | TCP_LINK_SOCKS_NOAUTHSTATUS | TCP_LINK_SOCKS_CROSSCONNECT | TCP_LINK_SOCKS_CONNSTATUS)))