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) { switch(rc) {
case OK: case OK:
bzero(&counters, sizeof(counters)); bzero(&counters, sizeof(counters));
counters.c_rcvd = 1;
counters.c_size += sdata->tot_len; counters.c_size += sdata->tot_len;
update_counters(sdata, data, &counters, cfg); 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: case ERR_EXISTS:
rc = OK; 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); printf("duplicate: %s (id: %s)\n", filename, sdata->ttmpfile);
break; break;