Skip to content

Commit

Permalink
implemented workaround for zohomail imap server
Browse files Browse the repository at this point in the history
  • Loading branch information
dinhvh committed Aug 23, 2011
1 parent 77900c9 commit 639a6bf
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions src/low-level/imap/mailimap_parser.c
Expand Up @@ -7057,12 +7057,28 @@ mailimap_message_data_parse_progress(mailstream * fd, MMAPString * buffer,
cur_token = * indx;
msg_att = NULL;

r = mailimap_nz_number_parse(fd, buffer, &cur_token, &number);
if (r != MAILIMAP_NO_ERROR) {
res = r;
goto err;
}
r = mailimap_nz_number_parse(fd, buffer, &cur_token, &number);
if (r == MAILIMAP_ERROR_PARSE) {
// workaround for Zoho Mail IMAP server. sometimes returns negative message numbers

r = mailimap_minus_parse(fd, buffer, &cur_token);
if (r != MAILIMAP_NO_ERROR) {
res = r;
goto err;
}
r = mailimap_number_parse(fd, buffer, &cur_token, &number);
if (r != MAILIMAP_NO_ERROR) {
res = r;
goto err;
}

number = 0;
}
else if (r != MAILIMAP_NO_ERROR) {
res = r;
goto err;
}

r = mailimap_space_parse(fd, buffer, &cur_token);
if (r != MAILIMAP_NO_ERROR) {
res = r;
Expand Down

0 comments on commit 639a6bf

Please sign in to comment.