Changeset 24 for trunk


Ignore:
Timestamp:
04/03/14 09:27:27 (10 years ago)
Author:
willem
Message:

willem

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/stopos.h

    r20 r24  
    3131const static size_t maxlinelength = 1024;
    3232
     33const std::string  connect_error_msg      = "ERROR: Cannot connect to server";
     34const unsigned int connect_error_retries  = 60;
     35
    3336#endif
  • trunk/stoposclient.cpp

    r22 r24  
    2424#include "shellenv.h"
    2525#include "stopos.h"
    26 #define  CONNECT_ERROR_MSG "ERROR: Cannot connect to server"
    27 #define  CONNECT_ERROR_RETRIES 10
    2826
    2927struct returnvalue
     
    174172    w.set_value(line);
    175173
    176     for (int i=0; i<CONNECT_ERROR_RETRIES; i++)
     174    for (int i=0; i<connect_error_retries; i++)
    177175    {
    178176      rc = w.send_message(body,header);
     
    182180    if (rc != 0)
    183181    {
    184       r.msg = CONNECT_ERROR_MSG;
     182      r.msg = connect_error_msg;
    185183      return 1;
    186184    }
     
    428426    std::string body,header;
    429427
    430     for (int i=0; i<CONNECT_ERROR_RETRIES; i++)
     428    for (int i=0; i<connect_error_retries; i++)
    431429    {
    432430      rc = w.send_message(body,header);
     
    435433    }
    436434    if (rc != 0)
    437       r.msg = CONNECT_ERROR_MSG;
     435      r.msg = connect_error_msg;
    438436    else
    439437      r.parse(body);
Note: See TracChangeset for help on using the changeset viewer.