This commit is contained in:
Artem Prilutskiy 2016-11-02 15:27:16 +03:00
parent c292b4ada8
commit b83a1da5ce
2 changed files with 8 additions and 12 deletions

View file

@ -17,7 +17,6 @@
#include <signal.h> #include <signal.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/utsname.h>
#ifdef __linux__ #ifdef __linux__
#include <endian.h> #include <endian.h>
@ -117,9 +116,9 @@ int main(int argc, const char* argv[])
uint16_t proxyPorts[PROXY_PORT_COUNT] = uint16_t proxyPorts[PROXY_PORT_COUNT] =
{ {
htobe16(50000), htons(50000),
htobe16(50001), htons(50001),
htobe16(50002) htons(50002)
}; };
// Start up // Start up
@ -263,7 +262,7 @@ int main(int argc, const char* argv[])
proxySocketAddress.sin_port = proxyPorts[selection]; proxySocketAddress.sin_port = proxyPorts[selection];
handle = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); handle = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
if((handle < 0) || if ((handle < 0) ||
(bind(handle, (struct sockaddr*)&proxySocketAddress, proxySocketLength) < 0)) (bind(handle, (struct sockaddr*)&proxySocketAddress, proxySocketLength) < 0))
{ {
print("Error opening port for Multi-Site Connect\n"); print("Error opening port for Multi-Site Connect\n");
@ -284,7 +283,7 @@ int main(int argc, const char* argv[])
uplinkSocketAddress.sin6_scope_id = 0; uplinkSocketAddress.sin6_scope_id = 0;
uplinkHandle = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP); uplinkHandle = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP);
if((uplinkHandle < 0) || if ((uplinkHandle < 0) ||
(bind(uplinkHandle, (struct sockaddr*)&uplinkSocketAddress, sizeof(uplinkSocketAddress)) < 0)) (bind(uplinkHandle, (struct sockaddr*)&uplinkSocketAddress, sizeof(uplinkSocketAddress)) < 0))
{ {
print("Error opening port for Rewind Uplink\n"); print("Error opening port for Rewind Uplink\n");
@ -389,9 +388,6 @@ 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 utsname systemName;
uname(&systemName);
struct sockaddr_in repeaterSocketAddresses[3]; struct sockaddr_in repeaterSocketAddresses[3];
memset(repeaterSocketAddresses, 0, sizeof(repeaterSocketAddresses)); memset(repeaterSocketAddresses, 0, sizeof(repeaterSocketAddresses));

View file

@ -1 +1 @@
#define VERSION 20161101 #define VERSION 20161102