mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
imap: Reworked the logic of untagged command responses
This commit is contained in:
parent
1ff6a8338d
commit
797b004738
15
lib/imap.c
15
lib/imap.c
@ -360,10 +360,10 @@ static bool imap_endofresp(struct connectdata *conn, char *line, size_t len,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Are we processing CAPABILITY command data? */
|
/* Do we have an untagged command response */
|
||||||
if(imapc->state == IMAP_CAPABILITY) {
|
if(len >= 2 && !memcmp("* ", line, 2)) {
|
||||||
/* Do we have a valid response? */
|
/* Are we processing CAPABILITY command data? */
|
||||||
if(len >= 2 && !memcmp("* ", line, 2)) {
|
if(imapc->state == IMAP_CAPABILITY) {
|
||||||
line += 2;
|
line += 2;
|
||||||
len -= 2;
|
len -= 2;
|
||||||
|
|
||||||
@ -425,11 +425,8 @@ static bool imap_endofresp(struct connectdata *conn, char *line, size_t len,
|
|||||||
len -= wordlen;
|
len -= wordlen;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
/* Are we processing FETCH command responses? */
|
||||||
/* Are we processing FETCH command responses? */
|
else if(imapc->state == IMAP_FETCH) {
|
||||||
else if(imapc->state == IMAP_FETCH) {
|
|
||||||
/* Do we have a valid response? */
|
|
||||||
if(len >= 2 && !memcmp("* ", line, 2)) {
|
|
||||||
*resp = '*';
|
*resp = '*';
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user