- Timestamp:
- 11/14/07 21:41:36 (6 years ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2, stable
- Children:
- 23c63eb
- Parents:
- 5782414
- Location:
- include
- Files:
-
- 7 edited
-
NSCHelper.cpp (modified) (1 diff)
-
NSCHelper.h (modified) (1 diff)
-
PDHCounter.h (modified) (3 diffs)
-
SSLSocket.cpp (modified) (2 diffs)
-
SSLSocket.h (modified) (2 diffs)
-
Socket.cpp (modified) (2 diffs)
-
Socket.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
include/NSCHelper.cpp
receb8c7 rb0ae738 610 610 return NSCAPI::returnIgnored; 611 611 NSCAPI::nagiosReturn ret = NSCHelper::wrapReturnString(returnBufferMessage, returnBufferMessageLen, retMessage, retResult); 612 if (!NSCHelper::isMyNagiosReturn(ret)) { 613 NSC_LOG_ERROR("A module returned an invalid return code"); 614 } 612 615 return NSCHelper::wrapReturnString(returnBufferPerf, returnBufferPerfLen, retPerformance, ret); 613 616 } 617 614 618 /** 615 619 * Wrap the NSLoadModule call -
include/NSCHelper.h
r30bfe74 rb0ae738 46 46 return true; 47 47 return false; 48 } 49 inline bool isMyNagiosReturn(NSCAPI::nagiosReturn code) { 50 return code == NSCAPI::returnCRIT || code == NSCAPI::returnOK || code == NSCAPI::returnWARN || code == NSCAPI::returnUNKNOWN 51 || code == NSCAPI::returnInvalidBufferLen || code == NSCAPI::returnIgnored; 48 52 } 49 53 -
include/PDHCounter.h
rb749b8d rb0ae738 201 201 } 202 202 virtual ~PDHQuery(void) { 203 if (hQuery_) 204 close(); 205 for (CounterList::iterator it = counters_.begin(); it != counters_.end(); it++) { 206 delete (*it); 207 } 208 counters_.clear(); 203 removeAllCounters(); 209 204 } 210 205 … … 220 215 return counter; 221 216 } 217 void removeAllCounters() { 218 if (hQuery_) 219 close(); 220 for (CounterList::iterator it = counters_.begin(); it != counters_.end(); it++) { 221 delete (*it); 222 } 223 counters_.clear(); 224 } 222 225 223 226 void open() { … … 233 236 void close() { 234 237 assert(hQuery_ != NULL); 235 DWORD x = PDH_INVALID_HANDLE;236 238 PDH_STATUS status; 237 239 for (CounterList::iterator it = counters_.begin(); it != counters_.end(); it++) { -
include/SSLSocket.cpp
r30bfe74 rb0ae738 68 68 69 69 70 voidsimpleSSL::sSSL::readAll(simpleSocket::DataBuffer &buffer, unsigned int tmpBufferLength /* = 1024*/) {70 bool simpleSSL::sSSL::readAll(simpleSocket::DataBuffer &buffer, unsigned int tmpBufferLength /* = 1024*/) { 71 71 // @todo this could be optimized a bit if we want to 72 72 // If only one buffer is needed we could "reuse" the buffer instead of copying it. … … 93 93 */ 94 94 delete [] tmpBuffer; 95 return n >= 0; 95 96 /* 96 97 if (n <= 0) { -
include/SSLSocket.h
r30bfe74 rb0ae738 227 227 context_ = context; 228 228 } 229 voidreadAll (simpleSocket::DataBuffer &buffer, unsigned int tmpBufferLength = 1024);229 bool readAll (simpleSocket::DataBuffer &buffer, unsigned int tmpBufferLength = 1024); 230 230 void send(const char * buf, unsigned int len); 231 231 }; … … 257 257 } 258 258 } 259 virtual voidreadAll (simpleSocket::DataBuffer &buffer, unsigned int tmpBufferLength = 1024) {259 virtual bool readAll (simpleSocket::DataBuffer &buffer, unsigned int tmpBufferLength = 1024) { 260 260 try { 261 ssl.readAll(buffer, tmpBufferLength);261 return ssl.readAll(buffer, tmpBufferLength); 262 262 } catch (simpleSSL::SSLException e) { 263 263 throw simpleSocket::SocketException(e.getMessage()); -
include/Socket.cpp
r478588b rb0ae738 37 37 * @param tmpBufferLength Length of temporary buffer to use (generally larger then expected data) 38 38 */ 39 voidsimpleSocket::Socket::readAll(DataBuffer& buffer, unsigned int tmpBufferLength /* = 1024*/) {39 bool simpleSocket::Socket::readAll(DataBuffer& buffer, unsigned int tmpBufferLength /* = 1024*/) { 40 40 // @todo this could be optimized a bit if we want to 41 41 // If only one buffer is needed we could "reuse" the buffer instead of copying it. … … 55 55 } 56 56 delete [] tmpBuffer; 57 return n!=SOCKET_ERROR; 57 58 } 58 59 -
include/Socket.h
r30bfe74 rb0ae738 226 226 return ret; 227 227 } 228 virtual voidreadAll(DataBuffer &buffer, unsigned int tmpBufferLength = 1024);228 virtual bool readAll(DataBuffer &buffer, unsigned int tmpBufferLength = 1024); 229 229 230 230 virtual void socket(int af, int type, int protocol ) {
Note: See TracChangeset
for help on using the changeset viewer.








