0.4.00.4.10.4.2stable
|
Last change
on this file since 76aafc4 was
cea178b,
checked in by Michael Medin <michael@…>, 8 years ago
|
|
MAJOR CHANGES
2004-04-19 MickeM
+ Added SSL support
+ Added alot of new options
+ Added documentation
- Renamed and restructured NSCLientCompat to CheckSystem
- *ALOT* of fixes all over
: We are now starting to get to something that is "stable"
: This means that soon you might actually be able to use this.
|
-
Property mode set to
100644
|
|
File size:
530 bytes
|
| Line | |
|---|
| 1 | #include "stdafx.h" |
|---|
| 2 | #include "strEx.h" |
|---|
| 3 | #include "NRPESocket.h" |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | const char* NRPEPacket::getBuffer() { |
|---|
| 10 | delete [] tmpBuffer; |
|---|
| 11 | tmpBuffer = new char[getBufferLength()]; |
|---|
| 12 | packet *p = reinterpret_cast<packet*>(tmpBuffer); |
|---|
| 13 | p->result_code = htons(NSCHelper::nagios2int(result_)); |
|---|
| 14 | p->packet_type = htons(type_); |
|---|
| 15 | p->packet_version = htons(version_); |
|---|
| 16 | p->crc32_value = 0; |
|---|
| 17 | strncpy(p->buffer, payload_.c_str(), 1023); |
|---|
| 18 | p->buffer[1024] = 0; |
|---|
| 19 | p->crc32_value = htonl(calculate_crc32(tmpBuffer, getBufferLength())); |
|---|
| 20 | return tmpBuffer; |
|---|
| 21 | } |
|---|
| 22 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.