]> granicus.if.org Git - curl/commitdiff
imap: Introduced the mailbox variable
authorJiri Hruska <jirka@fud.cz>
Wed, 27 Feb 2013 17:31:08 +0000 (18:31 +0100)
committerSteve Holme <steve_holme@hotmail.com>
Wed, 27 Feb 2013 20:08:00 +0000 (20:08 +0000)
Added the mailbox variable to the per-connection structure in
preparation for checking for an already selected mailbox.

lib/imap.c
lib/imap.h

index 9f0e6cb95d63e8876e355e8b219a87d52e2f53f4..38e25355b9baded05563089e1939cb38bceeb9ad 100644 (file)
@@ -1705,6 +1705,7 @@ static CURLcode imap_disconnect(struct connectdata *conn, bool dead_connection)
   Curl_sasl_cleanup(conn, imapc->authused);
 
   /* Cleanup our connection based variables */
+  Curl_safefree(imapc->mailbox);
   Curl_safefree(imapc->mailbox_uidvalidity);
 
   return CURLE_OK;
index aafa6341706fe03c93f2148bd801375b4c7df5c2..f9bae2e85bf844a8f5f8cbb66018a8a17b02cf94 100644 (file)
@@ -76,6 +76,7 @@ struct imap_conn {
   bool tls_supported;         /* StartTLS capability supported by server */
   bool login_disabled;        /* LOGIN command disabled by server */
   bool ir_supported;          /* Initial response supported by server */
+  char *mailbox;              /* The last selected mailbox */
   char *mailbox_uidvalidity;  /* UIDVALIDITY parsed from select response */
 };