mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 07:50:11 +01:00
imap gui import counter fix
This commit is contained in:
parent
cba9628780
commit
5bbf9458af
10
src/imap.c
10
src/imap.c
@ -23,6 +23,9 @@
|
||||
#include <piler.h>
|
||||
|
||||
|
||||
void update_import_job_stat(struct session_data *sdata, struct __data *data);
|
||||
|
||||
|
||||
int get_message_length_from_imap_answer(char *s, int *_1st_line_bytes){
|
||||
char *p, *q;
|
||||
int len=0;
|
||||
@ -204,6 +207,13 @@ int process_imap_folder(int sd, int *seq, char *folder, struct session_data *sda
|
||||
if(dryrun == 0) rc = import_message(filename, sdata, data, cfg);
|
||||
else rc = OK;
|
||||
|
||||
|
||||
if(data->import->processed_messages % 100 == 0){
|
||||
time(&(data->import->updated));
|
||||
update_import_job_stat(sdata, data);
|
||||
}
|
||||
|
||||
|
||||
if(rc == ERR) printf("error importing '%s'\n", filename);
|
||||
else unlink(filename);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user