From bd21392a7cdfefdd4a069707da31474da5fe9458 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Fri, 26 Jun 2015 11:33:22 +0200 Subject: src: add cache infrastructure and use it for table objects This patch introduces the generic object cache that is populated during the evaluation phase. The first client of this infrastructure are table objects. As a result, there is a single call to netlink_list_tables(). Signed-off-by: Pablo Neira Ayuso --- src/evaluate.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/evaluate.c') diff --git a/src/evaluate.c b/src/evaluate.c index 0bf4fecb..018d1b98 100644 --- a/src/evaluate.c +++ b/src/evaluate.c @@ -2005,6 +2005,12 @@ static int cmd_evaluate_monitor(struct eval_ctx *ctx, struct cmd *cmd) int cmd_evaluate(struct eval_ctx *ctx, struct cmd *cmd) { + int ret; + + ret = cache_update(cmd->op, ctx->msgs); + if (ret < 0) + return ret; + #ifdef DEBUG if (debug_level & DEBUG_EVALUATION) { struct error_record *erec; -- cgit v1.2.3