From: pcarana Date: Thu, 26 Nov 2020 00:19:57 +0000 (-0600) Subject: Add warning messages to notify start/end of first validation cycle X-Git-Tag: v1.5.0~8 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=38e256cb743ebda2cc01bc55ea6b6130ae8cea01;p=thirdparty%2FFORT-validator.git Add warning messages to notify start/end of first validation cycle --- 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 */