1. Fixed issue with length field of keep-alive packet
2. Extended amount of elements in RingBuffer, reduced item length 3. Added system information into keep-alive 4. Updated version number
This commit is contained in:
parent
092c1c22d4
commit
8798385d40
4 changed files with 21 additions and 13 deletions
|
@ -17,6 +17,7 @@
|
|||
#include <signal.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/utsname.h>
|
||||
|
||||
#ifdef USE_OPENSSL
|
||||
#include <openssl/sha.h>
|
||||
|
@ -524,6 +525,9 @@ int main(int argc, const char* argv[])
|
|||
0
|
||||
};
|
||||
|
||||
struct utsname systemName;
|
||||
uname(&systemName);
|
||||
|
||||
// Main loop
|
||||
|
||||
bool running = true;
|
||||
|
@ -801,12 +805,16 @@ int main(int argc, const char* argv[])
|
|||
|
||||
data->number = htole32(repeaterNumber);
|
||||
data->service = REWIND_SERVICE_CRONOS_AGENT;
|
||||
length += sprintf(data->description, "CronosAgent " STRING(VERSION) " " BUILD);
|
||||
|
||||
length += sprintf(data->description,
|
||||
"CronosAgent " STRING(VERSION) " %s %s " BUILD,
|
||||
systemName.sysname,
|
||||
systemName.machine);
|
||||
|
||||
outgoingBuffer->type = htole16(REWIND_TYPE_KEEP_ALIVE);
|
||||
outgoingBuffer->flags = htole16(REWIND_FLAG_DEFAULT_SET);
|
||||
outgoingBuffer->number = htole32(++ sequenceNumbers[0]);
|
||||
outgoingBuffer->length = htobe16(length);
|
||||
outgoingBuffer->length = htole16(length);
|
||||
length += sizeof(struct RewindData);
|
||||
sendto(uplinkHandle, outgoingBuffer, length, 0, serverAddress->ai_addr, serverAddress->ai_addrlen);
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ extern "C"
|
|||
{
|
||||
#endif
|
||||
|
||||
#define DATA_LENGTH 256
|
||||
#define BUFFER_LENGTH 8
|
||||
#define DATA_LENGTH 48
|
||||
#define BUFFER_LENGTH 16
|
||||
|
||||
struct BufferRecord
|
||||
{
|
||||
|
|
|
@ -1 +1 @@
|
|||
#define VERSION 20160806
|
||||
#define VERSION 20160811
|
||||
|
|
Loading…
Add table
Reference in a new issue