summaryrefslogtreecommitdiff
path: root/sysdep/unix/io.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2012-12-26 12:40:48 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2012-12-26 12:40:48 +0100
commita92cf57dd6ba021a495fe7268c86dc8e6aeecbb2 (patch)
tree1df35ec36e661dbdcd3b6065d86df651b2d240c7 /sysdep/unix/io.c
parent80a9cadc76101157707aecc0b482ad88ad702fc3 (diff)
Implements undo command and optional timeout for configuration
Several new configure command variants: configure undo - undo last reconfiguration configure timeout - configure with scheduled undo if not confirmed in timeout configure confirm - confirm last configuration configure check - just parse and validate config file
Diffstat (limited to 'sysdep/unix/io.c')
-rw-r--r--sysdep/unix/io.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c
index f91b5278..80914afe 100644
--- a/sysdep/unix/io.c
+++ b/sysdep/unix/io.c
@@ -121,7 +121,7 @@ static list near_timers, far_timers;
static bird_clock_t first_far_timer = TIME_INFINITY;
/* now must be different from 0, because 0 is a special value in timer->expires */
-bird_clock_t now = 1, now_real;
+bird_clock_t now = 1, now_real, boot_time;
static void
update_times_plain(void)
@@ -1530,6 +1530,7 @@ io_init(void)
krt_io_init();
init_times();
update_times();
+ boot_time = now;
srandom((int) now_real);
}
@@ -1557,7 +1558,7 @@ io_loop(void)
tm_shot();
continue;
}
- timo.tv_sec = events ? 0 : tout - now;
+ timo.tv_sec = events ? 0 : MIN(tout - now, 3);
timo.tv_usec = 0;
if (sock_recalc_fdsets_p)