From: Alberto Leiva Popper Date: Wed, 4 Oct 2023 23:20:09 +0000 (-0600) Subject: Memorize notification URI before handling RRDP objects X-Git-Tag: 1.6.0~47 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=a983b8228838e515005d450fd6f5851c81270ef7;p=thirdparty%2FFORT-validator.git Memorize notification URI before handling RRDP objects The URI is needed both by RRDP objects and Manifest; it seems I was not taking the former into account. --- diff --git a/src/rrdp/rrdp_loader.c b/src/rrdp/rrdp_loader.c index 79d7c045..875da4fd 100644 --- a/src/rrdp/rrdp_loader.c +++ b/src/rrdp/rrdp_loader.c @@ -58,6 +58,13 @@ rrdp_update(struct rpki_uri *uri) if (uri == NULL || !uri_is_https(uri)) pr_crit("Wrong call, trying to parse a non HTTPS URI"); + /* + * TODO (fine) this is dirty and error prone. + * Find a better way to deliver the notification URI to the RRDP objects + * and manifest. + */ + validation_set_notification_uri(state_retrieve(), uri); + fnstack_push_uri(uri); pr_val_debug("Processing notification."); @@ -104,11 +111,6 @@ revert_notification: update_notification_destroy(&new); end: notification_metadata_cleanup(&old); - - /* TODO (fine) hideous function side effect; find a better way. */ - if (!error) - validation_set_notification_uri(state_retrieve(), uri); - fnstack_pop(); return error; }