pop3 import message fixes

This commit is contained in:
SJ 2014-09-04 14:57:23 +02:00
parent d4084eaf48
commit 845f60bece

View File

@ -116,13 +116,13 @@ int process_pop3_emails(int sd, struct session_data *sdata, struct __data *data,
else return ERR; else return ERR;
printf("found %d messages\n", data->import->total_messages); if(data->quiet == 0) printf("found %d messages\n", data->import->total_messages);
if(data->import->total_messages <= 0) return OK; if(data->import->total_messages <= 0) return OK;
for(i=data->import->start_position; i<=data->import->total_messages; i++){ for(i=data->import->start_position; i<=data->import->total_messages; i++){
data->import->processed_messages++; data->import->processed_messages++;
printf("processed: %7d\r", data->import->processed_messages); fflush(stdout); if(data->quiet == 0){ printf("processed: %7d\r", data->import->processed_messages); fflush(stdout); }
snprintf(buf, sizeof(buf)-1, "RETR %d\r\n", i); snprintf(buf, sizeof(buf)-1, "RETR %d\r\n", i);
@ -222,7 +222,7 @@ int process_pop3_emails(int sd, struct session_data *sdata, struct __data *data,
snprintf(buf, sizeof(buf)-1, "QUIT\r\n"); snprintf(buf, sizeof(buf)-1, "QUIT\r\n");
n = write1(sd, buf, strlen(buf), use_ssl, data->ssl); n = write1(sd, buf, strlen(buf), use_ssl, data->ssl);
printf("\n"); if(data->quiet == 0) printf("\n");
time(&(data->import->finished)); time(&(data->import->finished));
data->import->status = 2; data->import->status = 2;