Ignore:
Timestamp:
03/28/05 12:24:08 (8 years ago)
Author:
Michael Medin <michael@…>
Branches:
master, 0.4.0, 0.4.1, 0.4.2, stable
Children:
aaa9a22
Parents:
1a5449e
Message:
  • Changed the Thread class a bit (mutex -> signal, and CreatThread? does not return the instance)
  • Moved settings "keys" fro NRPE to config.h
  • Changed build options (added Distribution) which builds a zip file under ./dist (requires 7z installed)
  • Minor tweaks to error/debug logging and small fixes "here and there"
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/NSClientListener/NSClientSocket.h

    r1a5449e r452fd41  
    11#pragma once 
    22#include "resource.h" 
    3 #include <Thread.h> 
    4 #include <Mutex.h> 
    5 #include <WinSock2.h> 
    6 #include <strEx.h> 
    7 #include <charEx.h> 
    83#include <Socket.h> 
    94/** 
     
    3328class NSClientSocket : public simpleSocket::Listener { 
    3429private: 
     30  strEx::splitList allowedHosts_; 
    3531 
    3632public: 
     
    4137  virtual void onAccept(simpleSocket::Socket client); 
    4238  std::string parseRequest(std::string buffer); 
     39  bool inAllowedHosts(std::string s) { 
     40    if (allowedHosts_.empty()) 
     41      return true; 
     42    strEx::splitList::const_iterator cit; 
     43    for (cit = allowedHosts_.begin();cit!=allowedHosts_.end();++cit) { 
     44      if ( (*cit) == s) 
     45        return true; 
     46    } 
     47    return false; 
     48  } 
     49 
     50public: 
     51  void setAllowedHosts(strEx::splitList allowedHosts) { 
     52    allowedHosts_ = allowedHosts; 
     53  } 
     54 
    4355}; 
    4456 
Note: See TracChangeset for help on using the changeset viewer.