Ignore:
Timestamp:
01/02/13 06:43:16 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Cleaned up and simplified the code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/xplcommon/win32/LocalConnector.cc

    r21 r22  
    4242bool LocalConnector::connect()
    4343{
    44     printf("LocalConnector::connect0\n");
    4544    if (connected) return true;
     45    if (failed()) return false;
    4646
    47     printf("LocalConnector::connect3\n");
    48 
    49     HANDLE handle = CreateFile(name, GENERIC_READ|GENERIC_WRITE,
    50                                0, 0, OPEN_EXISTING,
    51                                FILE_FLAG_NO_BUFFERING | FILE_FLAG_OVERLAPPED, 0);
    52     printf("LocalConnector::connect4\n");
    53     if (handle!=0) {
    54         printf("LocalConnector::connect5\n");
    55         socket.handle = handle;
     47    if (socket.connect(path)) {
    5648        connected = true;
    5749        return true;
    5850    } else {
    59         printf("LocalConnector::connect6\n");
    60         socket.setErrorCode(GetLastError());
    6151        return false;
    6252    }
Note: See TracChangeset for help on using the changeset viewer.