Changeset 35 in cheroxy for trunk/src/CRXSocket.cpp


Ignore:
Timestamp:
11/20/12 19:06:30 (11 years ago)
Author:
cheese
Message:

#1 add debugging message

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/CRXSocket.cpp

    r24 r35  
    112112    {
    113113        aResult = ERROR_TCPSOCKET_FAILED_TO_SETSOCKOPT;
    114         CRX_ERROR (aResult, "Failed to set socket option.");
     114        CRX_ERROR_SET (aResult, "Failed to set socket option.");
    115115    }
    116116    /*----------------------------------------------------------------*/
     
    188188    {
    189189        aResult = ERROR_TCPSOCKET_ALREADY_IN_USE;
    190         CRX_ERROR (aResult, "Already in use.");
     190        CRX_ERROR_SET (aResult, "Already in use.");
    191191        return aResult;
    192192    }
     
    196196    {
    197197        aResult = ERROR_TCPSOCKET_FAILED_TO_CREATE_SOCKET;
    198         CRX_ERROR (aResult, "Failed to create socket(%d).", GetSystemErrorCode ());
     198        CRX_ERROR_SET (aResult, "Failed to create socket(%d).", GetSystemErrorCode ());
    199199        return aResult;
    200200    }
     
    219219    {
    220220        aResult = ERROR_TCPSOCKET_FAILED_TO_CREATE_SOCKET;
    221         CRX_ERROR (aResult, "Failed to create socket(%d).", GetSystemErrorCode ());
     221        CRX_ERROR_SET (aResult, "Failed to create socket(%d).", GetSystemErrorCode ());
    222222        return aResult;
    223223    }
     
    233233        {
    234234            aResult = ERROR_TCPSOCKET_FAILED_TO_GET_HOSTNAME;
    235             CRX_ERROR (aResult, "Failed to get hostname.");
     235            CRX_ERROR_SET (aResult, "Failed to get hostname.");
    236236            return aResult;
    237237        }
     
    244244    {
    245245        aResult = ERROR_TCPSOCKET_FAILED_TO_SETSOCKOPT;
    246         CRX_ERROR (aResult, "Failed to set timeout (%d).", GetSystemErrorCode ());
     246        CRX_ERROR_SET (aResult, "Failed to set timeout (%d).", GetSystemErrorCode ());
    247247        return aResult;
    248248    }
     
    252252    {
    253253        aResult = ERROR_TCPSOCKET_FAILED_TO_CONNECT;
    254         CRX_ERROR (aResult, "Failed to connect (%d).", GetSystemErrorCode ());
     254        CRX_ERROR_SET (aResult, "Failed to connect (%d).", GetSystemErrorCode ());
    255255    }
    256256
     
    271271    {
    272272        aResult = ERROR_TCPSOCKET_FAILED_TO_CREATE_SOCKET;
    273         CRX_ERROR (aResult, "Failed to create socket(%d).", GetSystemErrorCode ());
     273        CRX_ERROR_SET (aResult, "Failed to create socket(%d).", GetSystemErrorCode ());
    274274        return aResult;
    275275    }
     
    283283    {
    284284        aResult = ERROR_TCPSOCKET_FAILED_TO_BIND;
    285         CRX_ERROR (aResult, "Failed to bind(%d).", GetSystemErrorCode ());
     285        CRX_ERROR_SET (aResult, "Failed to bind(%d).", GetSystemErrorCode ());
    286286        return aResult;
    287287    }
     
    291291    {
    292292        aResult = ERROR_TCPSOCKET_FAILED_TO_LISTEN;
    293         CRX_ERROR (aResult, "Failed to listen(%d).", GetSystemErrorCode ());
     293        CRX_ERROR_SET (aResult, "Failed to listen(%d).", GetSystemErrorCode ());
    294294        return aResult;
    295295    }
     
    322322    {
    323323        aResult = ERROR_TCPSOCKET_FAILED_TO_ACCEPT;
    324         CRX_ERROR (aResult, "Failed to accept(%d).", GetSystemErrorCode ());
     324        CRX_ERROR_SET (aResult, "Failed to accept(%d).", GetSystemErrorCode ());
    325325        return aResult;
    326326    }
     
    353353    {
    354354        aResult = ERROR_TCPSOCKET_FAILED_TO_SEND;
    355         CRX_ERROR (aResult, "Failed to send(%d).", GetSystemErrorCode ());
     355        CRX_ERROR_SET (aResult, "Failed to send(%d).", GetSystemErrorCode ());
    356356        return aResult;
    357357    }
     
    375375    {
    376376        aResult = ERROR_TCPSOCKET_FAILED_TO_RECEIVE;
    377         CRX_ERROR (aResult, "Failed to receive(%d).", GetSystemErrorCode ());
    378         return aResult;
    379     }
    380 
    381     /*----------------------------------------------------------------*/
    382     return aResult;
    383 }
     377        CRX_ERROR_SET (aResult, "Failed to receive(%d).", GetSystemErrorCode ());
     378        return aResult;
     379    }
     380
     381    /*----------------------------------------------------------------*/
     382    return aResult;
     383}
Note: See TracChangeset for help on using the changeset viewer.