Changeset 21 in cheroxy


Ignore:
Timestamp:
11/08/12 17:24:30 (11 years ago)
Author:
cheese
Message:

#1 remove unnecessary code in main

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/main.cpp

    r20 r21  
    1818using namespace std;
    1919
    20 #ifdef _WIN32
    21 # define __func__           __FUNCTION__
    22 #endif
    23 
    24 #define CRX_PRINT_ERROR(__code, __message)                                                              \
    25     do {                                                                                                \
    26         char __error[4096] = {0x00, };                                                                  \
    27         ostringstream __stream;                                                                         \
    28         __stream << __message;                                                                          \
    29         string __string = __stream.str ();                                                              \
    30         sprintf (__error, "[%s][%d] (%d) %s\n", __func__, __LINE__, __code, __string.c_str ());         \
    31         cout << __error;                                                                                \
    32     } while (0)
    33 
    3420int main (int argc, char* argv[])
    3521{
     
    4531     *----------------------------------------------------------------*/
    4632    aResult = aSocket.CreateServer (aPort);
     33    cout << "Failed to CreateServer." << endl;
    4734    if (aResult < 0)
    4835    {
    49         CRX_PRINT_ERROR (aResult, "failed to create server");
    5036        return aResult;
    5137    }
     
    5642        if (aResult < 0)
    5743        {
    58             CRX_PRINT_ERROR (aResult, "failed to accept");
     44            cout << "Failed to Accept." << endl;
    5945            break;
    6046        }
     
    6955        if (aResult < 0)
    7056        {
    71             CRX_PRINT_ERROR (aResult, "failed to create thread");
     57            cout << "Failed to forward." << endl;
    7258            break;
    7359        }
Note: See TracChangeset for help on using the changeset viewer.