From e597956eb540476965a08849f005a88efb921c77 Mon Sep 17 00:00:00 2001 From: SJ Date: Thu, 16 May 2013 12:24:46 +0200 Subject: [PATCH] pilerimport counter fix --- src/import.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/import.c b/src/import.c index 5138a1de..8ac1f6cf 100644 --- a/src/import.c +++ b/src/import.c @@ -100,6 +100,7 @@ int import_message(char *filename, struct session_data *sdata, struct __data *da switch(rc) { case OK: bzero(&counters, sizeof(counters)); + counters.c_rcvd = 1; counters.c_size += sdata->tot_len; update_counters(sdata, data, &counters, cfg); @@ -107,6 +108,11 @@ int import_message(char *filename, struct session_data *sdata, struct __data *da case ERR_EXISTS: rc = OK; + + bzero(&counters, sizeof(counters)); + counters.c_duplicate = 1; + update_counters(sdata, data, &counters, cfg); + printf("duplicate: %s (id: %s)\n", filename, sdata->ttmpfile); break;