diff options
Diffstat (limited to 'src/ot_livesync.c')
| -rw-r--r-- | src/ot_livesync.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ot_livesync.c b/src/ot_livesync.c index 85577f7..7d7208e 100644 --- a/src/ot_livesync.c +++ b/src/ot_livesync.c | |||
| @@ -178,13 +178,13 @@ void livesync_ticker(void) { | |||
| 178 | 178 | ||
| 179 | /* livesync_issue_peersync sets g_next_packet_time */ | 179 | /* livesync_issue_peersync sets g_next_packet_time */ |
| 180 | pthread_mutex_lock(&g_outbuf_mutex); | 180 | pthread_mutex_lock(&g_outbuf_mutex); |
| 181 | if (time_now_seconds() > g_v6_buf.next_packet_time && g_v6_buf.fill > sizeof(g_tracker_id) + sizeof(uint32_t)) | 181 | if (time_is_past(g_v6_buf.next_packet_time) && g_v6_buf.fill > sizeof(g_tracker_id) + sizeof(uint32_t)) |
| 182 | livesync_issue_peersync(&g_v6_buf); | 182 | livesync_issue_peersync(&g_v6_buf); |
| 183 | else | 183 | else |
| 184 | pthread_mutex_unlock(&g_outbuf_mutex); | 184 | pthread_mutex_unlock(&g_outbuf_mutex); |
| 185 | 185 | ||
| 186 | pthread_mutex_lock(&g_outbuf_mutex); | 186 | pthread_mutex_lock(&g_outbuf_mutex); |
| 187 | if (time_now_seconds() > g_v4_buf.next_packet_time && g_v4_buf.fill > sizeof(g_tracker_id) + sizeof(uint32_t)) | 187 | if (time_is_past(g_v4_buf.next_packet_time) && g_v4_buf.fill > sizeof(g_tracker_id) + sizeof(uint32_t)) |
| 188 | livesync_issue_peersync(&g_v4_buf); | 188 | livesync_issue_peersync(&g_v4_buf); |
| 189 | else | 189 | else |
| 190 | pthread_mutex_unlock(&g_outbuf_mutex); | 190 | pthread_mutex_unlock(&g_outbuf_mutex); |
