mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
imap: Added support for list command
This commit is contained in:
parent
742544aad0
commit
198012ee13
10
lib/imap.c
10
lib/imap.c
@ -1837,7 +1837,8 @@ static CURLcode imap_done(struct connectdata *conn, CURLcode status,
|
|||||||
conn->bits.close = TRUE; /* marked for closure */
|
conn->bits.close = TRUE; /* marked for closure */
|
||||||
result = status; /* use the already set error code */
|
result = status; /* use the already set error code */
|
||||||
}
|
}
|
||||||
else if(!data->set.connect_only && !imap->custom) {
|
else if(!data->set.connect_only && !imap->custom &&
|
||||||
|
(imap->uid || data->set.upload)) {
|
||||||
/* Handle responses after FETCH or APPEND transfer has finished */
|
/* Handle responses after FETCH or APPEND transfer has finished */
|
||||||
if(!data->set.upload)
|
if(!data->set.upload)
|
||||||
state(conn, IMAP_FETCH_FINAL);
|
state(conn, IMAP_FETCH_FINAL);
|
||||||
@ -1914,12 +1915,15 @@ static CURLcode imap_perform(struct connectdata *conn, bool *connected,
|
|||||||
else if(imap->custom && (selected || !imap->mailbox))
|
else if(imap->custom && (selected || !imap->mailbox))
|
||||||
/* Custom command using the same mailbox or no mailbox */
|
/* Custom command using the same mailbox or no mailbox */
|
||||||
result = imap_custom(conn);
|
result = imap_custom(conn);
|
||||||
else if(!imap->custom && selected)
|
else if(!imap->custom && selected && imap->uid)
|
||||||
/* FETCH from the same mailbox */
|
/* FETCH from the same mailbox */
|
||||||
result = imap_fetch(conn);
|
result = imap_fetch(conn);
|
||||||
else
|
else if(imap->uid)
|
||||||
/* SELECT the mailbox */
|
/* SELECT the mailbox */
|
||||||
result = imap_select(conn);
|
result = imap_select(conn);
|
||||||
|
else
|
||||||
|
/* LIST */
|
||||||
|
result = imap_list(conn);
|
||||||
|
|
||||||
if(result)
|
if(result)
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user