summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ot_livesync.c5
-rw-r--r--proxy.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/ot_livesync.c b/ot_livesync.c
index b876ef8..c4dc6e5 100644
--- a/ot_livesync.c
+++ b/ot_livesync.c
@@ -5,6 +5,7 @@
5 5
6/* System */ 6/* System */
7#include <arpa/inet.h> 7#include <arpa/inet.h>
8#include <fcntl.h>
8#include <pthread.h> 9#include <pthread.h>
9#include <stdlib.h> 10#include <stdlib.h>
10#include <string.h> 11#include <string.h>
@@ -13,7 +14,6 @@
13 14
14/* Libowfat */ 15/* Libowfat */
15#include "ip6.h" 16#include "ip6.h"
16#include "ndelay.h"
17#include "socket.h" 17#include "socket.h"
18 18
19/* Opentracker */ 19/* Opentracker */
@@ -101,7 +101,8 @@ void livesync_bind_mcast(ot_ip6 ip, uint16_t port) {
101 101
102 if ((g_socket_in = socket_udp4()) < 0) 102 if ((g_socket_in = socket_udp4()) < 0)
103 exerr("Error: Cant create live sync incoming socket."); 103 exerr("Error: Cant create live sync incoming socket.");
104 ndelay_off(g_socket_in); 104
105 fcntl(g_socket_in, F_SETFL, fcntl(g_socket_in, F_GETFL, 0) & ~O_NONBLOCK);
105 106
106 if (socket_bind4_reuse(g_socket_in, tmpip, port) == -1) 107 if (socket_bind4_reuse(g_socket_in, tmpip, port) == -1)
107 exerr("Error: Cant bind live sync incoming socket."); 108 exerr("Error: Cant bind live sync incoming socket.");
diff --git a/proxy.c b/proxy.c
index d728e5b..ec51630 100644
--- a/proxy.c
+++ b/proxy.c
@@ -7,6 +7,7 @@
7#include <arpa/inet.h> 7#include <arpa/inet.h>
8#include <ctype.h> 8#include <ctype.h>
9#include <errno.h> 9#include <errno.h>
10#include <fcntl.h>
10#include <pthread.h> 11#include <pthread.h>
11#include <stdint.h> 12#include <stdint.h>
12#include <stdio.h> 13#include <stdio.h>
@@ -19,7 +20,6 @@
19#include "io.h" 20#include "io.h"
20#include "iob.h" 21#include "iob.h"
21#include "ip6.h" 22#include "ip6.h"
22#include "ndelay.h"
23#include "scan.h" 23#include "scan.h"
24#include "socket.h" 24#include "socket.h"
25 25
@@ -101,7 +101,8 @@ void livesync_bind_mcast(ot_ip6 ip, uint16_t port) {
101 101
102 if ((g_socket_in = socket_udp4()) < 0) 102 if ((g_socket_in = socket_udp4()) < 0)
103 exerr("Error: Cant create live sync incoming socket."); 103 exerr("Error: Cant create live sync incoming socket.");
104 ndelay_off(g_socket_in); 104
105 fcntl(g_socket_in, F_SETFL, fcntl(g_socket_in, F_GETFL, 0) & ~O_NONBLOCK);
105 106
106 if (socket_bind4_reuse(g_socket_in, tmpip, port) == -1) 107 if (socket_bind4_reuse(g_socket_in, tmpip, port) == -1)
107 exerr("Error: Cant bind live sync incoming socket."); 108 exerr("Error: Cant bind live sync incoming socket.");