From 38e256cb743ebda2cc01bc55ea6b6130ae8cea01 Mon Sep 17 00:00:00 2001 From: pcarana Date: Wed, 25 Nov 2020 18:19:57 -0600 Subject: [PATCH] Add warning messages to notify start/end of first validation cycle --- src/validation_run.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/validation_run.c b/src/validation_run.c index 9ac9a18b..325641fd 100644 --- a/src/validation_run.c +++ b/src/validation_run.c @@ -6,6 +6,7 @@ #include "config.h" #include "log.h" #include "notify.h" +#include "config/mode.h" #include "rtr/db/vrps.h" /* Runs a single cycle, use at standalone mode or before running RTR server */ @@ -15,12 +16,20 @@ validation_run_first(void) bool upd; int error; + if (config_get_mode() == SERVER) + pr_op_warn("First validation cycle has begun, wait until the next notification to connect your router(s)"); + else + pr_op_warn("First validation cycle has begun"); + upd = false; error = vrps_update(&upd); if (error) return pr_op_err("First validation wasn't successful."); - return 0; + if (config_get_mode() == SERVER) + return pr_op_warn("First validation cycle successfully ended, now you can connect your router(s)"); + + return pr_op_warn("First validation cycle successfully ended, terminating execution"); } /* Run a validation cycle each 'server.interval.validation' secs */ -- 2.47.2