]> granicus.if.org Git - curl/commitdiff
imap: Introduced FETCH_FINAL state for processing final fetch responses
authorJiri Hruska <jirka@fud.cz>
Thu, 28 Feb 2013 18:16:33 +0000 (19:16 +0100)
committerSteve Holme <steve_holme@hotmail.com>
Thu, 28 Feb 2013 21:00:10 +0000 (21:00 +0000)
A typical FETCH response can be broken down into four parts:

  1) "* <uid> FETCH (<what> {<size>}\r\n", using continuation syntax
  2) <size> bytes of the actual message
  3) ")\r\n", finishing the untagged response
  4) "<tag> OK ...", finishing the command

Part 1 is read in imap_fetch_resp(), part 2 is consumed in the PERFORM
phase by the transfer subsystem, parts 3 and 4 are currently ignored.

lib/imap.c
lib/imap.h

index 8c1ea01d69cc31e932da8d47bfab449da1876cda..8f6aad7c6ddd540d626f1913857f6746623010ad 100644 (file)
@@ -467,6 +467,7 @@ static void state(struct connectdata *conn, imapstate newstate)
     "LOGIN",
     "SELECT",
     "FETCH",
+    "FETCH_FINAL",
     "LOGOUT",
     /* LAST */
   };
index 428bc23ae9a4161b1a4c4966b05f364b85f2808e..af12130bd62661a378b76b2ef3f93de64eed16bb 100644 (file)
@@ -47,6 +47,7 @@ typedef enum {
   IMAP_LOGIN,
   IMAP_SELECT,
   IMAP_FETCH,
+  IMAP_FETCH_FINAL,
   IMAP_LOGOUT,
   IMAP_LAST          /* never used */
 } imapstate;