From 8dce3504fde7da933dc6e7ecfeb99b4b45125f32 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Thu, 15 Jan 2009 23:19:58 +0100 Subject: cache: add status field to store the object status This patch adds the status field to the cache object. This avoids the (ab)use of the alarm to check if an entry is active or dead. This is the first step to possibly move the alarm to the cache_extra memory space of the ftfw (which is the only use by now). Signed-off-by: Pablo Neira Ayuso --- src/cache_iterators.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cache_iterators.c') diff --git a/src/cache_iterators.c b/src/cache_iterators.c index 4773889..ab6a461 100644 --- a/src/cache_iterators.c +++ b/src/cache_iterators.c @@ -51,7 +51,7 @@ static int do_dump(void *data1, struct hashtable_node *n) * specific and it breaks conntrackd modularity. Probably * there's a nicer way to do this but until I come up with it... */ - if (CONFIG(flags) & CTD_SYNC_FTFW && alarm_pending(&obj->alarm)) + if (CONFIG(flags) & CTD_SYNC_FTFW && obj->status == C_OBJ_DEAD) return 0; /* do not show cached timeout, this may confuse users */ -- cgit v1.2.3