Changeset 862371b for libfaim/conn.c


Ignore:
Timestamp:
Jun 29, 2003, 1:47:04 PM (21 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
e016fc2
Parents:
03ad7b2
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfaim/conn.c

    r5e53c4a r862371b  
    1 
    21/*
    32 * conn.c
     
    1514#include <sys/socket.h>
    1615#include <netinet/in.h>
     16#endif
     17
     18#ifdef _WIN32
     19#include "win32dep.h"
    1720#endif
    1821
     
    446449                        i = 3;
    447450                }
    448 
    449451                if (write(fd, buf, i) < i) {
    450452                        *statusret = errno;
     
    452454                        return -1;
    453455                }
    454 
    455456                if (read(fd, buf, 2) < 2) {
    456457                        *statusret = errno;
     
    502503                        return -1;
    503504                }
     505
    504506                if (read(fd, buf, 10) < 10) {
    505507                        *statusret = errno;
     
    877879        sess->modlistv = NULL;
    878880
     881        sess->ssi.received_data = 0;
     882        sess->ssi.waiting_for_ack = 0;
     883        sess->ssi.holding_queue = NULL;
     884        sess->ssi.revision = 0;
     885        sess->ssi.items = NULL;
     886        sess->ssi.timestamp = (time_t)0;
     887
     888        sess->emailinfo = NULL;
     889
    879890        /*
    880891         * Default to SNAC login unless XORLOGIN is explicitly set.
     
    909920        aim__registermodule(sess, chatnav_modfirst);
    910921        aim__registermodule(sess, chat_modfirst);
    911         /* missing 0x0f - 0x12 */
     922        aim__registermodule(sess, newsearch_modfirst);
     923        /* missing 0x10 - 0x12 */
    912924        aim__registermodule(sess, ssi_modfirst);
    913925        /* missing 0x14 */
    914         aim__registermodule(sess, icq_modfirst);
     926        aim__registermodule(sess, icq_modfirst); /* XXX - Make sure this isn't sent for AIM */
    915927        /* missing 0x16 */
    916928        aim__registermodule(sess, auth_modfirst);
     929        aim__registermodule(sess, email_modfirst);
    917930
    918931        return;
     
    981994        fd_set fds, wfds;
    982995        struct timeval tv;
    983         int res, error = ETIMEDOUT;
     996        int res;
     997        int error = ETIMEDOUT;
     998
    984999        aim_rxcallback_t userfunc;
    9851000
     
    10091024        if (FD_ISSET(conn->fd, &fds) || FD_ISSET(conn->fd, &wfds)) {
    10101025                int len = sizeof(error);
    1011 
    10121026                if (getsockopt(conn->fd, SOL_SOCKET, SO_ERROR, &error, &len) < 0)
    10131027                        error = errno;
     
    10191033                return -1;
    10201034        }
    1021 
    10221035        fcntl(conn->fd, F_SETFL, 0); /* XXX should restore original flags */
    10231036
     
    10541067
    10551068        return 0;
    1056 
    10571069}
    10581070
     
    10611073 *
    10621074 * No-op.  WinAIM 4.x sends these _every minute_ to keep
    1063  * the connection alive. 
     1075 * the connection alive.
    10641076 */
    10651077faim_export int aim_flap_nop(aim_session_t *sess, aim_conn_t *conn)
     
    10741086        return 0;
    10751087}
    1076 
    1077 
Note: See TracChangeset for help on using the changeset viewer.