From 6c129c65bba3ddfe20eba64e68628dd2970157b3 Mon Sep 17 00:00:00 2001 From: Janos SUTO Date: Sun, 9 Jul 2017 16:48:16 +0200 Subject: [PATCH] improved pilertest Signed-off-by: Janos SUTO --- src/test.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/test.c b/src/test.c index aafeef14..f85e53cf 100644 --- a/src/test.c +++ b/src/test.c @@ -17,6 +17,7 @@ int main(int argc, char **argv){ int i; + time_t retention_seconds=0; struct stat st; struct session_data sdata; struct parser_state state; @@ -107,11 +108,12 @@ int main(int argc, char **argv){ printf("rules check: %s\n", rule); - sdata.retained = sdata.now + query_retain_period(&data, &state, st.st_size, sdata.spam_message, &cfg); + retention_seconds = query_retain_period(&data, &state, st.st_size, sdata.spam_message, &cfg); + sdata.retained = sdata.now + retention_seconds; printf("folder: %d\n", get_folder_id_by_rule(&data, &state, st.st_size, sdata.spam_message, &cfg)); - printf("retention period: %lu\n", sdata.retained); + printf("retention period: %lu (%ld days)\n", sdata.retained, retention_seconds/86400); clearrules(data.archiving_rules); clearrules(data.retention_rules);