From: pcarana Date: Thu, 13 Jun 2019 20:49:05 +0000 (-0500) Subject: Fix warnings at man, fix bug: rsync wasn't executed on each validation X-Git-Tag: v0.0.2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=16c75e5a1cdfaa346787bdaa0dca540d24403558;p=thirdparty%2FFORT-validator.git Fix warnings at man, fix bug: rsync wasn't executed on each validation --- diff --git a/man/fort.8 b/man/fort.8 index 41d45179..6eeeb73d 100644 --- a/man/fort.8 +++ b/man/fort.8 @@ -439,6 +439,7 @@ Run FORT using the JSON configuration file \fIconf.json\fR. \-\-server.address ::1 \-\-server.port 9323 \\ \-\-server.validation-interval 1800 \\ \-\-output.roa /tmp/roas.csv\fR +.fi .RS 4 Run FORT with RTR server listening on IPv6 address \fI::1\fR, port 9323, validating every 30 minutes, and printing the ROAs CSV in a file. @@ -497,7 +498,7 @@ to a specific value: "roa": "/tmp/roas.csv" } } -.ni +.fi .RE .P @@ -544,8 +545,8 @@ assertions: "bgpsecAssertions": [] } } +.fi .RE -.ni .P .\".SH COPYRIGHT diff --git a/src/main.c b/src/main.c index 373da9ab..66ffb346 100644 --- a/src/main.c +++ b/src/main.c @@ -4,7 +4,6 @@ #include "extension.h" #include "nid.h" #include "thread_var.h" -#include "rsync/rsync.h" #include "rtr/rtr.h" #include "rtr/db/vrps.h" @@ -42,12 +41,9 @@ main(int argc, char **argv) if (error) return error; - error = rsync_init(); - if (error) - goto revert_config; error = nid_init(); if (error) - goto revert_rsync; + goto revert_config; error = extension_init(); if (error) goto revert_nid; @@ -56,8 +52,6 @@ main(int argc, char **argv) revert_nid: nid_destroy(); -revert_rsync: - rsync_destroy(); revert_config: free_rpki_config(); return error; diff --git a/src/object/tal.c b/src/object/tal.c index 7ff8c0ea..f0923836 100644 --- a/src/object/tal.c +++ b/src/object/tal.c @@ -399,10 +399,15 @@ perform_standalone_validation(struct validation_handler *handler) { int error; + error = rsync_init(); + if (error) + return error; + fnstack_init(); error = process_file_or_dir(config_get_tal(), TAL_FILE_EXTENSION, do_file_validation, handler); fnstack_cleanup(); + rsync_destroy(); return error; }