diff --git a/CronosAgent.c b/CronosAgent.c index 63f53ca..1236e47 100644 --- a/CronosAgent.c +++ b/CronosAgent.c @@ -533,7 +533,7 @@ int main(int argc, const char* argv[]) if (type == REWIND_TYPE_EXTERNAL_SERVER) { - repeaterSocketAddress.sin_port = htons(proxyMediaPort); + repeaterSocketAddress.sin_port = htons(KAIROS_HAM_DEFAULT_PORT); sendto(mediaHandle, incomingBuffer->data, length, 0, (struct sockaddr*)&repeaterSocketAddress, sizeof(struct sockaddr_in)); continue; } @@ -610,6 +610,7 @@ int main(int argc, const char* argv[]) length += sizeof(struct RewindData); sendto(uplinkHandle, outgoingBuffer, length, 0, serverAddress->ai_addr, serverAddress->ai_addrlen); } + continue; } @@ -642,6 +643,7 @@ int main(int argc, const char* argv[]) (length >= 8)) { outgoingBuffer->type = htole16(REWIND_TYPE_REMOTE_CONTROL); + outgoingBuffer->flags = htole16(REWIND_FLAG_DEFAULT_SET); outgoingBuffer->number = htole32(++ sequenceNumbers[0]); outgoingBuffer->length = htole16(length); length += sizeof(struct RewindData); @@ -692,6 +694,7 @@ int main(int argc, const char* argv[]) (length >= 20)) { outgoingBuffer->type = htole16(REWIND_TYPE_SNMP_TRAP); + outgoingBuffer->flags = htole16(REWIND_FLAG_DEFAULT_SET); outgoingBuffer->number = htole32(++ sequenceNumbers[0]); outgoingBuffer->length = htole16(length); length += sizeof(struct RewindData); @@ -728,6 +731,7 @@ int main(int argc, const char* argv[]) data->number = htole32(repeaterNumber); outgoingBuffer->type = htole16(REWIND_TYPE_KEEP_ALIVE); + outgoingBuffer->flags = htole16(REWIND_FLAG_DEFAULT_SET); outgoingBuffer->number = htole32(++ sequenceNumbers[0]); outgoingBuffer->length = htobe16(length); length += sizeof(struct RewindData); @@ -749,6 +753,7 @@ int main(int argc, const char* argv[]) { #endif outgoingBuffer->type = htole16(REWIND_TYPE_CLOSE); + outgoingBuffer->flags = htole16(REWIND_FLAG_DEFAULT_SET); outgoingBuffer->number = htole32(++ sequenceNumbers[0]); outgoingBuffer->length = 0; sendto(uplinkHandle, outgoingBuffer, sizeof(struct RewindData), 0, serverAddress->ai_addr, serverAddress->ai_addrlen); diff --git a/Rewind.h b/Rewind.h index 14ef5df..51e646b 100644 --- a/Rewind.h +++ b/Rewind.h @@ -36,8 +36,10 @@ extern "C" #define REWIND_TYPE_REMOTE_CONTROL (REWIND_CLASS_KAIROS_DATA + 1) #define REWIND_TYPE_SNMP_TRAP (REWIND_CLASS_KAIROS_DATA + 2) -#define REWIND_FLAG_SLOT_1 (1 << 0) -#define REWIND_FLAG_SLOT_2 (1 << 1) +#define REWIND_FLAG_NONE 0 +#define REWIND_FLAG_REAL_TIME_1 (1 << 0) +#define REWIND_FLAG_REAL_TIME_2 (1 << 1) +#define REWIND_FLAG_DEFAULT_SET REWIND_FLAG_NONE struct RewindVersionData {