From 1c9657aba87ffda2cf5b09df6963b92619214943 Mon Sep 17 00:00:00 2001 From: claudio Date: Thu, 13 Jan 2022 11:47:44 +0000 Subject: [PATCH] Add the same entityq_flush() logic in ta_lookup() as it is done in repo_lookup(). This fixes -n mode. OK tb@ --- usr.sbin/rpki-client/repo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.sbin/rpki-client/repo.c b/usr.sbin/rpki-client/repo.c index 1d4c5c4ded9..5451021f519 100644 --- a/usr.sbin/rpki-client/repo.c +++ b/usr.sbin/rpki-client/repo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: repo.c,v 1.20 2022/01/11 13:06:07 claudio Exp $ */ +/* $OpenBSD: repo.c,v 1.21 2022/01/13 11:47:44 claudio Exp $ */ /* * Copyright (c) 2021 Claudio Jeker * Copyright (c) 2019 Kristaps Dzonsons @@ -1095,6 +1095,9 @@ ta_lookup(int id, struct tal *tal) rp->ta = ta_get(tal); + if (repo_state(rp) != REPO_LOADING) + entityq_flush(&rp->queue, rp); + return rp; } -- 2.20.1