Ignore:
Timestamp:
12/29/12 10:03:12 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Moved the storage of the error code to where it belongs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/xplcommon/posix/ClientSocket.cc

    r6 r14  
    3636#include <poll.h>
    3737
     38#include <sys/socket.h>
     39
    3840//------------------------------------------------------------------------------
    3941
     
    7274//------------------------------------------------------------------------------
    7375
     76bool ClientSocket::connect(const struct sockaddr* addr, size_t addrlen)
     77{
     78    int result = ::connect(fd, addr, addrlen);
     79    if (result<0 && errno!=EINPROGRESS) {
     80        setErrorCodeFromErrno();
     81    }
     82    return result>=0;
     83}
     84
     85//------------------------------------------------------------------------------
     86
    7487// Local Variables:
    7588// mode: C++
Note: See TracChangeset for help on using the changeset viewer.