aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-02-28 22:51:32 +0000
committerSteve Holme <steve_holme@hotmail.com>2013-02-28 22:51:32 +0000
commit48596f87a952b7d705ff6004a270f145a0620ad2 (patch)
treea29ea60f0ca5e1f13e7b5f7d7933b49fb372fb63 /lib
parentb06a78622609d2016c140599e9380db5f200c10a (diff)
imap: Another minor comment addition / tidy up
Diffstat (limited to 'lib')
-rw-r--r--lib/imap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/imap.c b/lib/imap.c
index c9e2a1923..52a3541bd 100644
--- a/lib/imap.c
+++ b/lib/imap.c
@@ -675,13 +675,16 @@ static CURLcode imap_select(struct connectdata *conn)
Curl_safefree(imapc->mailbox);
Curl_safefree(imapc->mailbox_uidvalidity);
+ /* Make sure the mailbox is in the correct atom format */
mailbox = imap_atom(imap->mailbox ? imap->mailbox : "");
if(!mailbox)
result = CURLE_OUT_OF_MEMORY;
else
+ /* Send the SELECT command */
result = imap_sendf(conn, "SELECT %s", mailbox);
Curl_safefree(mailbox);
+
if(!result)
state(conn, IMAP_SELECT);
@@ -697,6 +700,7 @@ static CURLcode imap_fetch(struct connectdata *conn)
result = imap_sendf(conn, "FETCH %s BODY[%s]",
imap->uid ? imap->uid : "1",
imap->section ? imap->section : "");
+
if(!result)
state(conn, IMAP_FETCH);