From cb11ee67dca0d61721d9271cc60e64c70cb845b1 Mon Sep 17 00:00:00 2001 From: martijn Date: Tue, 19 Jul 2022 19:25:42 +0000 Subject: [PATCH] Objects are only set to ready if both their parent region and their (optional) indices are ready. However, indices in another region than the object can be made ready at a later time. These indices should then trigger the ready state in their related objects. This didn't happen for dynamic indices. OK sthen@ --- lib/libagentx/agentx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/libagentx/agentx.c b/lib/libagentx/agentx.c index 49ee220ad7a..65fa5cc84a4 100644 --- a/lib/libagentx/agentx.c +++ b/lib/libagentx/agentx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agentx.c,v 1.14 2021/10/24 18:03:27 martijn Exp $ */ +/* $OpenBSD: agentx.c,v 1.15 2022/07/19 19:25:42 martijn Exp $ */ /* * Copyright (c) 2019 Martijn van Duren * @@ -1660,7 +1660,7 @@ agentx_index_finalize(struct ax_pdu *pdu, void *cookie) #endif if (axi->axi_type == AXI_TYPE_DYNAMIC) { axi->axi_cstate = AX_CSTATE_OPEN; - return 0; + goto objects_start; } resp = &(pdu->ap_payload.ap_response); @@ -1717,6 +1717,7 @@ agentx_index_finalize(struct ax_pdu *pdu, void *cookie) if (axi->axi_dstate == AX_DSTATE_CLOSE) return agentx_index_close(axi); + objects_start: /* TODO Make use of range_subid register */ for (i = 0; i < axi->axi_objectlen; i++) { if (axi->axi_object[i]->axo_dstate == AX_DSTATE_OPEN) { -- 2.20.1