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