mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
imap: Simplified command response test in imap_endofresp()
This commit is contained in:
parent
324b7fe47b
commit
c38d69f06a
@ -335,13 +335,11 @@ static bool imap_endofresp(struct connectdata *conn, char *line, size_t len,
|
|||||||
size_t wordlen;
|
size_t wordlen;
|
||||||
|
|
||||||
/* Do we have a tagged command response? */
|
/* Do we have a tagged command response? */
|
||||||
if(len >= id_len + 3) {
|
if(len >= id_len + 3 && !memcmp(id, line, id_len) && line[id_len] == ' ') {
|
||||||
if(!memcmp(id, line, id_len) && line[id_len] == ' ') {
|
|
||||||
*resp = line[id_len + 1]; /* O, N or B */
|
*resp = line[id_len + 1]; /* O, N or B */
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Do we have a continuation response? */
|
/* Do we have a continuation response? */
|
||||||
if((len == 3 && !memcmp("+", line, 1)) ||
|
if((len == 3 && !memcmp("+", line, 1)) ||
|
||||||
|
Loading…
Reference in New Issue
Block a user