From 13ef5e53dd4a98c80261139b4c9ce4b1074cac40 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Fri, 24 Jun 2022 15:27:26 +0200 Subject: The show-route CLI command now uses the route export API In the multithreaded environment, it is not supposed that anybody traverses the routing table as the CLI show-route was doing. Now the routing table traversal is gone and CLI won't hold the table locked while computing filters. --- nest/cli.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nest/cli.h') diff --git a/nest/cli.h b/nest/cli.h index 8a3294c5..92572968 100644 --- a/nest/cli.h +++ b/nest/cli.h @@ -33,12 +33,12 @@ typedef struct cli { struct cli_out *tx_buf, *tx_pos, *tx_write; event *event; void (*cont)(struct cli *c); - void (*cleanup)(struct cli *c); + int (*cleanup)(struct cli *c); /* Return 0 if finished and cli may be freed immediately. + Otherwise return 1 and call rfree(c->pool) when appropriate. */ void *rover; /* Private to continuation routine */ int last_reply; int restricted; /* CLI is restricted to read-only commands */ struct linpool *parser_pool; /* Pool used during parsing */ - struct linpool *show_pool; /* Pool used during route show */ byte *ring_buf; /* Ring buffer for asynchronous messages */ byte *ring_end, *ring_read, *ring_write; /* Pointers to the ring buffer */ uint ring_overflow; /* Counter of ring overflows */ -- cgit v1.2.3