From a983b8228838e515005d450fd6f5851c81270ef7 Mon Sep 17 00:00:00 2001 From: Alberto Leiva Popper Date: Wed, 4 Oct 2023 17:20:09 -0600 Subject: [PATCH] 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. --- src/rrdp/rrdp_loader.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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; } -- 2.47.2