From b83a1da5ce747649b6c48994f2bd0389a32b4c98 Mon Sep 17 00:00:00 2001 From: Artem Prilutskiy Date: Wed, 2 Nov 2016 15:27:16 +0300 Subject: [PATCH] .. --- TellusAgent.c | 18 +++++++----------- Version.h | 2 +- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/TellusAgent.c b/TellusAgent.c index f6bb2ea..e827040 100644 --- a/TellusAgent.c +++ b/TellusAgent.c @@ -17,7 +17,6 @@ #include #include #include -#include #ifdef __linux__ #include @@ -117,9 +116,9 @@ int main(int argc, const char* argv[]) uint16_t proxyPorts[PROXY_PORT_COUNT] = { - htobe16(50000), - htobe16(50001), - htobe16(50002) + htons(50000), + htons(50001), + htons(50002) }; // Start up @@ -263,8 +262,8 @@ int main(int argc, const char* argv[]) proxySocketAddress.sin_port = proxyPorts[selection]; handle = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - if((handle < 0) || - (bind(handle, (struct sockaddr*)&proxySocketAddress, proxySocketLength) < 0)) + if ((handle < 0) || + (bind(handle, (struct sockaddr*)&proxySocketAddress, proxySocketLength) < 0)) { print("Error opening port for Multi-Site Connect\n"); return EXIT_FAILURE; @@ -284,8 +283,8 @@ int main(int argc, const char* argv[]) uplinkSocketAddress.sin6_scope_id = 0; uplinkHandle = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP); - if((uplinkHandle < 0) || - (bind(uplinkHandle, (struct sockaddr*)&uplinkSocketAddress, sizeof(uplinkSocketAddress)) < 0)) + if ((uplinkHandle < 0) || + (bind(uplinkHandle, (struct sockaddr*)&uplinkSocketAddress, sizeof(uplinkSocketAddress)) < 0)) { print("Error opening port for Rewind Uplink\n"); return EXIT_FAILURE; @@ -389,9 +388,6 @@ int main(int argc, const char* argv[]) memset(outgoingBuffer, 0, sizeof(struct RewindData)); memcpy(outgoingBuffer, REWIND_PROTOCOL_SIGN, REWIND_SIGN_LENGTH); - struct utsname systemName; - uname(&systemName); - struct sockaddr_in repeaterSocketAddresses[3]; memset(repeaterSocketAddresses, 0, sizeof(repeaterSocketAddresses)); diff --git a/Version.h b/Version.h index 49a1ce8..ff2f25e 100644 --- a/Version.h +++ b/Version.h @@ -1 +1 @@ -#define VERSION 20161101 +#define VERSION 20161102