Updates to Tellus
This commit is contained in:
parent
fda42f5587
commit
e1fa8d8f6a
1 changed files with 6 additions and 1 deletions
|
@ -388,7 +388,7 @@ int main(int argc, const char* argv[])
|
|||
memset(outgoingBuffer, 0, sizeof(struct RewindData));
|
||||
memcpy(outgoingBuffer, REWIND_PROTOCOL_SIGN, REWIND_SIGN_LENGTH);
|
||||
|
||||
struct sockaddr_in repeaterSocketAddresses[3];
|
||||
struct sockaddr_in repeaterSocketAddresses[2 * PROXY_PORT_COUNT];
|
||||
memset(repeaterSocketAddresses, 0, sizeof(repeaterSocketAddresses));
|
||||
|
||||
// Main loop
|
||||
|
@ -511,9 +511,14 @@ int main(int argc, const char* argv[])
|
|||
int handle = proxyHandles[selection];
|
||||
if (CHECK(event, handle))
|
||||
{
|
||||
struct sockaddr_in dummyAddress;
|
||||
socklen_t size = sizeof(struct sockaddr_in);
|
||||
uint8_t* buffer = (uint8_t*)outgoingBuffer->data;
|
||||
struct sockaddr_in* address = repeaterSocketAddresses + selection;
|
||||
|
||||
// Move to additional buffer to keep initial value
|
||||
address += PROXY_PORT_COUNT * (address->si_family != AF_UNSPEC);
|
||||
|
||||
size_t length = recvfrom(handle, buffer, BUFFER_SIZE, 0, (struct sockaddr*)address, &size);
|
||||
|
||||
outgoingBuffer->type = htole16(REWIND_CLASS_HYTERA_DATA + selection);
|
||||
|
|
Loading…
Add table
Reference in a new issue