From 4b63854c854486490314a5fc8ff2bc905aec5813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juhani=20Krekel=C3=A4?= Date: Sat, 13 Jul 2019 19:41:35 +0300 Subject: [PATCH] =?UTF-8?q?Broadcast=20status=20period=205min=20=E2=86=92?= =?UTF-8?q?=201min?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ethermess-backend.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ethermess-backend.c b/ethermess-backend.c index b608f57..0711a85 100644 --- a/ethermess-backend.c +++ b/ethermess-backend.c @@ -24,7 +24,7 @@ #define EM_PROTOCOL_VERSION 0 #define EM_MESSAGE_MAX_LENGTH (1500 - 2 - 2 - 2) -#define EM_STATUS_BROADCAST_TIME (5 * 60 * 1000 + 1000 * random_byte() / 64) +#define EM_STATUS_BROADCAST_TIME (60 * 1000 + 1000 * random_byte() / 64) #define EM_RETRANSMIT_TIME (1000 + random_byte() * 2) #define EM_MAX_RETRANSMIT 5 @@ -1028,7 +1028,7 @@ void eventloop(void) { if (status_broadcast_wait_ms == 0) { // The time has come to send the status broadcast send_status(broadcast_mac); - // Do next one in about 5 minutes + // Do next one in about a minute next_status_broadcast = ms_in_future(EM_STATUS_BROADCAST_TIME); } @@ -1142,7 +1142,7 @@ int main(int argc, char **argv) { // Broadcast our status to the network to let them know we're here send_status(broadcast_mac); - // Schedule next broadcast of our status about 5 min in the future + // Schedule next broadcast of our status about 1 min in the future next_status_broadcast = ms_in_future(EM_STATUS_BROADCAST_TIME); // Request status from everyone, so that we can get an idea of who is on the network