Changeset 2c34b97 in nscp


Ignore:
Timestamp:
02/25/07 13:37:27 (6 years ago)
Author:
Michael Medin <michael@…>
Branches:
master, 0.4.0, 0.4.1, 0.4.2, stable
Children:
dc65e35
Parents:
2603350
Message:

+ Added possibility to check many memory checks in one go, just stack type options.

type=paged type=physical etc...

  • Fixed a performance check bug in the last nightly.
  • Fixed a potential crash when a maleformed check-file-age command was issued. + Added support for more then and NSClient command
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • changelog

    r2603350 r2c34b97  
    1010 * Add option to recheck DNS in real time 
    1111 
     122006-02-25 MickeM 
     13 + Added possibility to check many memory checks in one go, just stack type options. 
     14     type=paged type=physical etc... 
     15 * Fixed a performance check bug in the last nightly. 
     16 * Fixed a potential crash when a maleformed check-file-age command was issued. 
     17 + Added support for more then and NSClient command 
     18  
    12192006-02-22 MickeM 
    1320 + Added debug output to see if the socket is bound and/or has shutdown. 
  • include/Socket.h

    r2603350 r2c34b97  
    4848    unsigned int getLength() const { 
    4949      return length_; 
     50    } 
     51    void nibble(const unsigned int length) { 
     52      if (length > length_) 
     53        return; 
     54      unsigned int newLen = length_-length; 
     55      char *tBuf = new char[newLen+1]; 
     56      memcpy(tBuf, &buffer_[length], newLen); 
     57      char *oldBuf = buffer_; 
     58      buffer_ = tBuf; 
     59      length_ = newLen; 
     60      delete [] oldBuf; 
     61    } 
     62 
     63    DataBuffer unshift(const unsigned int length) { 
     64      DataBuffer ret; 
     65      if (length > length_) 
     66        return ret; 
     67      ret.copyFrom(buffer_, length); 
     68      unsigned int newLen = length_-length; 
     69      char *tBuf = new char[newLen+1]; 
     70      memcpy(tBuf, &buffer_[length], newLen); 
     71      char *oldBuf = buffer_; 
     72      buffer_ = tBuf; 
     73      length_ = newLen; 
     74      delete [] oldBuf; 
     75      return ret; 
     76    } 
     77    const unsigned long long find(char c) { 
     78      if (buffer_ == NULL) 
     79        return 0; 
     80      if (length_ == 0) 
     81        return 0; 
     82      const char *pos = strchr(buffer_, c); 
     83      if (pos == NULL) 
     84        return 0; 
     85      return pos-buffer_; 
    5086    } 
    5187    void copyFrom(const char* buffer, const unsigned int length) { 
  • include/checkHelpers.hpp

    r2603350 r2c34b97  
    652652      } else if (min.hasBounds()) { 
    653653        return min.gatherPerfData(alias, value, warn.min.getPerfBound(value), crit.min.getPerfBound(value)); 
     654      } else { 
     655        NSC_DEBUG_MSG_STD("Missing bounds for maxmin-bounds check: " + alias); 
    654656      } 
    655657      return ""; 
  • include/utils.h

    r2603350 r2c34b97  
    7676  std::pair<std::string,std::string> arg = strEx::split(p__.first,splt); if (false) {} 
    7777 
     78#define MAP_OPTIONS_SECONDARY_STR_AND(opt, value, objfirst, objsecond, extra) \ 
     79      else if (opt.first == value) { objfirst = p__.second; objsecond = opt.second; extra;} 
     80 
    7881#define MAP_OPTIONS_SECONDARY_END() } 
  • modules/CheckDisk/CheckDisk.cpp

    r2603350 r2c34b97  
    4444}; 
    4545typedef std::unary_function<const file_finder_data&, bool> baseFinderFunction; 
     46 
    4647struct get_size : public baseFinderFunction 
    4748{ 
    48   get_size() : size(0) { } 
     49  bool error; 
     50  get_size() : size(0), error(false) { } 
    4951  result_type operator()(argument_type ffd) { 
    5052    if (!(ffd.wfd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)) { 
     
    5557  inline unsigned long long getSize() { 
    5658    return size; 
     59  } 
     60  inline const bool hasError() const { 
     61    return error; 
     62  } 
     63  inline void setError(std::string) { 
     64    error = true; 
    5765  } 
    5866private:   
     
    8088      } 
    8189    } while (FindNextFile(hFind, &wfd)); 
     90  } else { 
     91    f.setError("File not found"); 
    8292  } 
    8393  FindClose(hFind); 
     
    185195    if (drive.data.length() == 1) 
    186196      drive.data += ":"; 
    187     if (!bPerfData) 
    188       drive.perfData = false; 
     197    drive.perfData = bPerfData; 
    189198    UINT drvType = GetDriveType(drive.data.c_str()); 
    190199 
     
    268277    get_size sizeFinder; 
    269278    recursive_scan<get_size>(path.data, sizeFinder); 
     279    if (sizeFinder.hasError()) { 
     280      message = "File not found"; 
     281      return NSCAPI::returnUNKNOWN; 
     282    } 
    270283    path.setDefault(tmpObject); 
    271     if (!bPerfData) 
    272       path.perfData = false; 
     284    path.perfData = bPerfData; 
    273285 
    274286    checkHolders::disk_size_type size = sizeFinder.getSize(); 
     
    337349struct find_first_file_info : public baseFinderFunction 
    338350{ 
    339  
    340351  file_info info; 
    341   bool bError; 
    342   std::string message; 
    343   find_first_file_info() : bError(false) {} 
     352  bool error; 
     353//  std::string message; 
     354  find_first_file_info() : error(false) {} 
    344355  result_type operator()(argument_type ffd) { 
    345356    if ((ffd.wfd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)) 
     
    350361      0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0); 
    351362    if (hFile == INVALID_HANDLE_VALUE) { 
    352       message = "Could not open file: " + ffd.path + "\\" + ffd.wfd.cFileName + ": " + strEx::itos(GetLastError()); 
    353       bError = true; 
     363      setError("Could not open file: " + ffd.path + "\\" + ffd.wfd.cFileName + ": " + strEx::itos(GetLastError())); 
    354364      return false; 
    355365    } 
     
    358368    info = file_info(_info, ffd.wfd.cFileName); 
    359369    return false; 
     370  } 
     371  inline const bool hasError() const { 
     372    return error; 
     373  } 
     374  inline void setError(std::string) { 
     375    error = true; 
    360376  } 
    361377}; 
     
    366382  bool bFilterAll; 
    367383  bool bFilterIn; 
    368   bool bError; 
     384  bool error; 
    369385  std::string message; 
    370386  std::string syntax; 
     
    372388  unsigned int hit_count; 
    373389 
    374   file_filter_function() : hit_count(0), bError(false), bFilterIn(true), bFilterAll(true) {} 
     390  file_filter_function() : hit_count(0), error(false), bFilterIn(true), bFilterAll(true) {} 
    375391  result_type operator()(argument_type ffd) { 
    376392    if ((ffd.wfd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)) 
     
    381397      0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0); 
    382398    if (hFile == INVALID_HANDLE_VALUE) { 
    383       message = "Could not open file: " + ffd.path + "\\" + ffd.wfd.cFileName + ": " + strEx::itos(GetLastError()); 
    384       bError = true; 
    385       return false; 
     399      setError("Could not open file: " + ffd.path + "\\" + ffd.wfd.cFileName + ": " + strEx::itos(GetLastError())); 
    386400    } 
    387401    GetFileInformationByHandle(hFile, &_info); 
     
    411425    return true; 
    412426  } 
     427  inline const bool hasError() const { 
     428    return error; 
     429  } 
     430  inline void setError(std::string) { 
     431    error = true; 
     432  } 
    413433}; 
    414434 
     
    421441    return NSCAPI::returnUNKNOWN; 
    422442  } 
    423   std::string dstr, path; 
     443  std::string dstr = "%#c"; 
     444  std::string path; 
    424445  find_first_file_info finder; 
    425446  MAP_OPTIONS_BEGIN(stl_args) 
     
    428449  MAP_OPTIONS_END() 
    429450 
     451  if (path.empty()) { 
     452    message = "ERROR: no file specified."; 
     453    return NSCAPI::returnUNKNOWN; 
     454  } 
     455 
    430456  recursive_scan<find_first_file_info>(path, finder); 
    431   if (finder.bError) { 
    432     message = "ERROR: could not find file."; 
     457  if (finder.hasError()) { 
     458    message = "File not found"; 
    433459    return NSCAPI::returnUNKNOWN; 
    434460  } 
     
    495521  for (std::list<std::string>::const_iterator pit = paths.begin(); pit != paths.end(); ++pit) { 
    496522    recursive_scan<file_filter_function>((*pit), finder); 
     523    if (finder.hasError()) { 
     524      message = "File not found: " + (*pit); 
     525      return NSCAPI::returnUNKNOWN; 
     526    } 
    497527  } 
    498528  message = finder.message; 
    499   if (finder.bError) 
     529  if (finder.error) 
    500530    return NSCAPI::returnUNKNOWN; 
    501531  query.runCheck(finder.hit_count, returnCode, message, perf); 
  • modules/CheckSystem/CheckSystem.cpp

    r2603350 r2c34b97  
    4545bool CheckSystem::loadModule() { 
    4646  pdhThread.createThread(); 
    47  
    4847  std::string wantedMethod = NSCModuleHelper::getSettingsString(C_SYSTEM_SECTION_TITLE, C_SYSTEM_ENUMPROC_METHOD, C_SYSTEM_ENUMPROC_METHOD_DEFAULT); 
    49  
    5048  CEnumProcess tmp; 
    5149  int method = tmp.GetAvailableMethods(); 
    52  
    53  
    54  
    5550  if (wantedMethod == C_SYSTEM_ENUMPROC_METHOD_AUTO) { 
    5651    OSVERSIONINFO osVer = systemInfo::getOSVersion(); 
     
    111106 
    112107int CheckSystem::commandLineExec(const char* command,const unsigned int argLen,char** args) { 
    113   if (stricmp(command, "debugpdh") == 0) { 
     108  if (_stricmp(command, "debugpdh") == 0) { 
    114109    PDH::Enumerations::Objects lst = PDH::Enumerations::EnumObjects(); 
    115110    for (PDH::Enumerations::Objects::iterator it = lst.begin();it!=lst.end();++it) { 
     
    224219      } 
    225220    } 
    226   } else if (stricmp(command, "listpdh") == 0) { 
     221  } else if (_stricmp(command, "listpdh") == 0) { 
    227222    PDH::Enumerations::Objects lst = PDH::Enumerations::EnumObjects(); 
    228223    for (PDH::Enumerations::Objects::iterator it = lst.begin();it!=lst.end();++it) { 
     
    352347    } else { 
    353348      load.setDefault(tmpObject); 
    354       if (!bPerfData) 
    355         load.perfData = false; 
     349      load.perfData = bPerfData; 
    356350      load.runCheck(value, returnCode, msg, perf); 
    357351    } 
     
    403397  } else { 
    404398    value *= 1000; 
    405     if (!bPerfData) 
    406       bounds.perfData = false; 
     399    bounds.perfData = bPerfData; 
    407400    bounds.runCheck(value, returnCode, msg, perf); 
    408401  } 
     
    539532      else 
    540533        value = checkHolders::state_none; 
    541       if (!bPerfData) 
    542         (*it).perfData = false; 
     534      (*it).perfData = bPerfData; 
    543535      (*it).runCheck(value, returnCode, msg, perf); 
    544536    } 
     
    551543  return returnCode; 
    552544} 
    553  
    554545 
    555546/** 
     
    572563    return NSCAPI::returnUNKNOWN; 
    573564  } 
     565  std::list<MemoryConatiner> list; 
    574566  NSCAPI::nagiosReturn returnCode = NSCAPI::returnOK; 
    575567  bool bShowAll = false; 
    576568  bool bPerfData = true; 
    577569  bool bNSClient = false; 
    578   MemoryConatiner bounds; 
    579   typedef enum { tPaged, tPage, tVirtual, tPhysical } check_type; 
    580   check_type type = tPaged; 
     570  MemoryConatiner tmpObject; 
    581571 
    582572  MAP_OPTIONS_BEGIN(stl_args) 
    583     MAP_OPTIONS_DISK_ALL(bounds, "", "Free", "Used") 
    584     MAP_OPTIONS_STR("Alias", bounds.data) 
    585     MAP_OPTIONS_SHOWALL(bounds) 
     573    MAP_OPTIONS_STR_AND("type", tmpObject.data, list.push_back(tmpObject)) 
     574    MAP_OPTIONS_STR_AND("Type", tmpObject.data, list.push_back(tmpObject)) 
     575    MAP_OPTIONS_DISK_ALL(tmpObject, "", "Free", "Used") 
     576    MAP_OPTIONS_STR("Alias", tmpObject.data) 
     577    MAP_OPTIONS_SHOWALL(tmpObject) 
    586578    MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 
    587579    MAP_OPTIONS_BOOL_TRUE(NSCLIENT, bNSClient) 
    588     MAP_OPTIONS_MODE("type", "paged", type, tPaged) 
    589     MAP_OPTIONS_MODE("type", "page", type, tPage) 
    590     MAP_OPTIONS_MODE("type", "virtual", type, tVirtual) 
    591     MAP_OPTIONS_MODE("type", "physical", type, tPhysical) 
     580    MAP_OPTIONS_SECONDARY_BEGIN(":", p2) 
     581      MAP_OPTIONS_SECONDARY_STR_AND(p2,"type", tmpObject.data, tmpObject.alias, list.push_back(tmpObject)) 
     582      MAP_OPTIONS_MISSING_EX(p2, msg, "Unknown argument: ") 
     583    MAP_OPTIONS_SECONDARY_END() 
    592584    MAP_OPTIONS_MISSING(msg, "Unknown argument: ") 
    593585  MAP_OPTIONS_END() 
    594  
    595  
    596   checkHolders::PercentageValueType<unsigned long long, unsigned long long> value; 
    597   if (type == tPaged) { 
    598     PDHCollector *pObject = pdhThread.getThread(); 
    599     if (!pObject) { 
    600       msg = "ERROR: PDH Collection thread not running."; 
    601       return NSCAPI::returnUNKNOWN; 
    602     } 
    603     value.value = pObject->getMemCommit(); 
    604     value.total = pObject->getMemCommitLimit(); 
    605     if (bounds.data.empty()) 
    606       bounds.data = "paged bytes"; 
    607   } else { 
    608     CheckMemory::memData data; 
    609     try { 
    610       data = memoryChecker.getMemoryStatus(); 
    611     } catch (CheckMemoryException e) { 
    612       msg = e.getError() + ":" + strEx::itos(e.getErrorCode()); 
    613       return NSCAPI::returnCRIT; 
    614     } 
    615 //    MEMORYSTATUS mem; 
    616 //    GlobalMemoryStatus(&mem); 
    617     if (type == tPage) { 
     586  if (bNSClient) { 
     587    tmpObject.data = "paged"; 
     588    list.push_back(tmpObject); 
     589  } 
     590 
     591  checkHolders::PercentageValueType<unsigned long long, unsigned long long> dataPaged; 
     592  CheckMemory::memData data; 
     593  bool firstPaged = true; 
     594  bool firstMem = true; 
     595  for (std::list<MemoryConatiner>::const_iterator pit = list.begin(); pit != list.end(); ++pit) { 
     596    MemoryConatiner check = (*pit); 
     597    checkHolders::PercentageValueType<unsigned long long, unsigned long long> value; 
     598    if (firstPaged && (check.data == "paged")) { 
     599      firstPaged = false; 
     600      PDHCollector *pObject = pdhThread.getThread(); 
     601      if (!pObject) { 
     602        msg = "ERROR: PDH Collection thread not running."; 
     603        return NSCAPI::returnUNKNOWN; 
     604      } 
     605      dataPaged.value = pObject->getMemCommit(); 
     606      dataPaged.total = pObject->getMemCommitLimit(); 
     607    } else if (firstMem) { 
     608      try { 
     609        data = memoryChecker.getMemoryStatus(); 
     610      } catch (CheckMemoryException e) { 
     611        msg = e.getError() + ":" + strEx::itos(e.getErrorCode()); 
     612        return NSCAPI::returnCRIT; 
     613      } 
     614    } 
     615 
     616    if (check.data == "page") { 
    618617      value.value = data.pageFile.total-data.pageFile.avail; // mem.dwTotalPageFile-mem.dwAvailPageFile; 
    619618      value.total = data.pageFile.total; //mem.dwTotalPageFile; 
    620       if (bounds.data.empty()) 
    621         bounds.data = "page file"; 
    622     } else  if (type == tPhysical) { 
     619      if (check.alias.empty()) 
     620        check.alias = "page file"; 
     621    } else if (check.data == "physical") { 
    623622      value.value = data.phys.total-data.phys.avail; //mem.dwTotalPhys-mem.dwAvailPhys; 
    624623      value.total = data.phys.total; //mem.dwTotalPhys; 
    625       if (bounds.data.empty()) 
    626         bounds.data = "physical memory"; 
    627     } else  if (type == tVirtual) { 
     624      if (check.alias.empty()) 
     625        check.alias = "physical memory"; 
     626    } else if (check.data == "virtual") { 
    628627      value.value = data.virtualMem.total-data.virtualMem.avail;//mem.dwTotalVirtual-mem.dwAvailVirtual; 
    629628      value.total = data.virtualMem.total;//mem.dwTotalVirtual; 
    630       if (bounds.data.empty()) 
    631         bounds.data = "virtual memory"; 
    632     } 
    633   } 
    634  
    635   if (bNSClient) { 
    636     msg = strEx::itos(value.total) + "&" + strEx::itos(value.value); 
    637     return NSCAPI::returnOK; 
    638   } else { 
    639     if (!bPerfData) 
    640       bounds.perfData = false; 
    641     bounds.runCheck(value, returnCode, msg, perf); 
    642   } 
     629      if (check.alias.empty()) 
     630        check.alias = "virtual memory"; 
     631    } else  if (check.data == "paged") { 
     632      value.value = dataPaged.value; 
     633      value.total = dataPaged.total; 
     634      if (check.alias.empty()) 
     635        check.alias = "paged bytes"; 
     636    } else { 
     637      msg = check.data + " is not a known check..."; 
     638      return NSCAPI::returnCRIT; 
     639    } 
     640    if (bNSClient) { 
     641      msg = strEx::itos(value.total) + "&" + strEx::itos(value.value); 
     642      return NSCAPI::returnOK; 
     643    } else { 
     644      check.perfData = bPerfData; 
     645      check.runCheck(value, returnCode, msg, perf); 
     646    } 
     647  } 
     648  NSC_DEBUG_MSG_STD("Perf data: " + strEx::itos(bPerfData) + ":" + perf); 
     649 
    643650  if (msg.empty()) 
    644651    msg = "OK memory within bounds."; 
     
    767774        value.state = checkHolders::state_stopped; 
    768775      } 
    769       if (!bPerfData) 
    770         (*it).perfData = false; 
     776      (*it).perfData = bPerfData; 
    771777      (*it).runCheck(value, returnCode, msg, perf); 
    772778    } 
     
    857863        msg += strEx::itos(value); 
    858864      } else { 
    859         if (!bPerfData) 
    860           counter.perfData = false; 
     865        counter.perfData = bPerfData; 
    861866        counter.setDefault(tmpObject); 
    862867        counter.runCheck(value, returnCode, msg, perf); 
  • modules/NRPEListener/NRPEListener.cpp

    r2603350 r2c34b97  
    3737bool NRPEListener::loadModule() { 
    3838  bUseSSL_ = NSCModuleHelper::getSettingsInt(NRPE_SECTION_TITLE, NRPE_SETTINGS_USE_SSL ,NRPE_SETTINGS_USE_SSL_DEFAULT)==1; 
    39   noPerfData_ = NSCModuleHelper::getSettingsInt(NRPE_SECTION_TITLE, NRPE_SETTINGS_PERFDATA,NRPE_SETTINGS_PERFDATA_DEFAULT)==1; 
     39  noPerfData_ = NSCModuleHelper::getSettingsInt(NRPE_SECTION_TITLE, NRPE_SETTINGS_PERFDATA,NRPE_SETTINGS_PERFDATA_DEFAULT)==0; 
    4040  timeout = NSCModuleHelper::getSettingsInt(NRPE_SECTION_TITLE, NRPE_SETTINGS_TIMEOUT ,NRPE_SETTINGS_TIMEOUT_DEFAULT); 
    4141  std::list<std::string> commands = NSCModuleHelper::getSettingsSection(NRPE_HANDLER_SECTION_TITLE); 
  • modules/NSClientListener/NSClientListener.cpp

    r2603350 r2c34b97  
    122122 
    123123std::string NSClientListener::parseRequest(std::string buffer)  { 
     124  NSC_DEBUG_MSG_STD("Data: " + buffer); 
     125 
     126  std::string::size_type pos = buffer.find_first_of("\n\r"); 
     127  if (pos != std::string::npos) { 
     128    std::string::size_type pos2 = buffer.find_first_not_of("\n\r", pos); 
     129    if (pos2 != std::string::npos) { 
     130      std::string rest = buffer.substr(pos2); 
     131      NSC_DEBUG_MSG_STD("Ignoring datat: " + rest); 
     132    } 
     133    buffer = buffer.substr(0, pos); 
     134  } 
     135 
    124136  strEx::token pwd = strEx::getToken(buffer, '&'); 
    125137  if (!isPasswordOk(pwd.first)) { 
     
    134146 
    135147  int c = atoi(cmd.first.c_str()); 
     148 
     149  NSC_DEBUG_MSG_STD("Data: " + cmd.second); 
     150 
    136151 
    137152  // prefix various commands 
     
    209224{} 
    210225 
     226void NSClientListener::sendTheResponse(simpleSocket::Socket *client, std::string response) { 
     227  client->send(response.c_str(), static_cast<int>(response.length()), 0); 
     228} 
     229 
     230void NSClientListener::retrivePacket(simpleSocket::Socket *client) { 
     231  simpleSocket::DataBuffer db; 
     232 
     233  int i; 
     234  for (i=0;i<30;i++) { 
     235    client->readAll(db); 
     236 
     237    if (db.getLength() > 0) { 
     238      unsigned long long pos = db.find('\n'); 
     239      if (pos==0) { 
     240        std::string incoming(db.getBuffer(), db.getLength()); 
     241        sendTheResponse(client, parseRequest(incoming)); 
     242        break; 
     243      } else if (pos!=0) { 
     244        simpleSocket::DataBuffer buffer = db.unshift(pos); 
     245        std::string bstr(buffer.getBuffer(), buffer.getLength()); 
     246        db.nibble(1); 
     247        std::string rstr(db.getBuffer(), db.getLength()); 
     248        std::string incoming(buffer.getBuffer(), buffer.getLength()); 
     249        sendTheResponse(client, parseRequest(incoming) + "\n"); 
     250      } 
     251    } else { 
     252      Sleep(100); 
     253    } 
     254  } 
     255  if (i == 100) { 
     256    NSC_LOG_ERROR_STD("Could not retrieve NSClient packet."); 
     257    client->close(); 
     258    return; 
     259  } 
     260} 
     261 
     262 
    211263void NSClientListener::onAccept(simpleSocket::Socket *client) { 
    212264  if (!allowedHosts.inAllowedHosts(client->getAddrString())) { 
     
    215267    return; 
    216268  } 
    217   simpleSocket::DataBuffer db; 
    218  
    219   int i; 
    220   for (i=0;i<100;i++) { 
    221     client->readAll(db); 
    222     // @todo Make this check if a packet is read instead of just if we have data 
    223     if (db.getLength() > 0) 
    224       break; 
    225     Sleep(100); 
    226   } 
    227   if (i == 100) { 
    228     NSC_LOG_ERROR_STD("Could not retrieve NSClient packet."); 
    229     client->close(); 
    230     return; 
    231   } 
     269  retrivePacket(client); 
    232270 
    233271 
    234272 
    235273//  client->readAll(db); 
    236   if (db.getLength() > 0) { 
    237     std::string incoming(db.getBuffer(), db.getLength()); 
     274//  if (db.getLength() > 0) { 
     275//    std::string incoming(db.getBuffer(), db.getLength()); 
    238276//    NSC_DEBUG_MSG_STD("Incoming data: " + incoming); 
    239     std::string response = parseRequest(incoming); 
     277//    std::string response = parseRequest(incoming); 
    240278//    NSC_DEBUG_MSG("Outgoing data: " + response); 
    241     client->send(response.c_str(), static_cast<int>(response.length()), 0); 
    242   } 
     279//    client->send(response.c_str(), static_cast<int>(response.length()), 0); 
     280//  } 
    243281  client->close(); 
    244282} 
  • modules/NSClientListener/NSClientListener.h

    r2603350 r2c34b97  
    3030 
    3131  std::string parseRequest(std::string buffer); 
     32  void sendTheResponse(simpleSocket::Socket *client, std::string response); 
     33  void retrivePacket(simpleSocket::Socket *client); 
    3234  bool isPasswordOk(std::string remotePassword); 
    3335 
Note: See TracChangeset for help on using the changeset viewer.