summaryrefslogtreecommitdiff
path: root/ot_livesync.c
diff options
context:
space:
mode:
Diffstat (limited to 'ot_livesync.c')
-rw-r--r--ot_livesync.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ot_livesync.c b/ot_livesync.c
index f620592..efba4d7 100644
--- a/ot_livesync.c
+++ b/ot_livesync.c
@@ -57,7 +57,7 @@ static sync_buffer g_v6_buf;
57static sync_buffer g_v4_buf; 57static sync_buffer g_v4_buf;
58 58
59static pthread_t thread_id; 59static pthread_t thread_id;
60void livesync_init() { 60void livesync_init(void) {
61 61
62 if (g_socket_in == -1) 62 if (g_socket_in == -1)
63 exerr("No socket address for live sync specified."); 63 exerr("No socket address for live sync specified.");
@@ -78,7 +78,7 @@ void livesync_init() {
78 pthread_create(&thread_id, NULL, livesync_worker, NULL); 78 pthread_create(&thread_id, NULL, livesync_worker, NULL);
79} 79}
80 80
81void livesync_deinit() { 81void livesync_deinit(void) {
82 if (g_socket_in != -1) 82 if (g_socket_in != -1)
83 close(g_socket_in); 83 close(g_socket_in);
84 if (g_socket_out != -1) 84 if (g_socket_out != -1)
@@ -167,7 +167,7 @@ static void livesync_handle_peersync(struct ot_workstruct *ws, size_t peer_size)
167/* Tickle the live sync module from time to time, so no events get 167/* Tickle the live sync module from time to time, so no events get
168 stuck when there's not enough traffic to fill udp packets fast 168 stuck when there's not enough traffic to fill udp packets fast
169 enough */ 169 enough */
170void livesync_ticker() { 170void livesync_ticker(void) {
171 /* livesync_issue_peersync sets g_next_packet_time */ 171 /* livesync_issue_peersync sets g_next_packet_time */
172 pthread_mutex_lock(&g_outbuf_mutex); 172 pthread_mutex_lock(&g_outbuf_mutex);
173 if (g_now_seconds > g_v6_buf.next_packet_time && g_v6_buf.fill > sizeof(g_tracker_id) + sizeof(uint32_t)) 173 if (g_now_seconds > g_v6_buf.next_packet_time && g_v6_buf.fill > sizeof(g_tracker_id) + sizeof(uint32_t))