pilerimport counter fix

This commit is contained in:
SJ 2013-05-16 12:24:46 +02:00
parent 43b72c3e57
commit e597956eb5

View File

@ -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;