]> Pileus Git - ~andy/fetchmail/blobdiff - imap.c
Abstract out host allocation.
[~andy/fetchmail] / imap.c
diff --git a/imap.c b/imap.c
index cd7e4bdf0279e0628f1e499d74e9544c0b22a081..ac13f068a6bcad94f78322f457a0d84809c096f4 100644 (file)
--- a/imap.c
+++ b/imap.c
@@ -25,7 +25,7 @@
 
 static int count, seen;
 
-int imap_ok (argbuf,socket)
+int imap_ok (socket, argbuf)
 /* parse command response */
 char *argbuf;
 int socket;
@@ -90,24 +90,22 @@ char *buf;
                  queryctl->remotename, queryctl->password));
 }
 
-static imap_getrange(socket, queryctl, countp, firstp)
+static imap_getrange(socket, queryctl, countp)
 /* get range of messages to be fetched */
 int socket;
 struct hostrec *queryctl;
 int *countp;
-int *firstp;
 {
     int ok;
 
     /* find out how many messages are waiting */
     ok = gen_transact(socket,
                  "SELECT %s",
-                 queryctl->remotefolder[0] ? queryctl->remotefolder : "INBOX");
+                 queryctl->mailbox[0] ? queryctl->mailbox : "INBOX");
     if (ok != 0)
        return(ok);
 
     *countp = count;
-    *firstp = 1;
 
     return(0);
 }
@@ -173,7 +171,7 @@ int number;
     return(gen_transact(socket, "STORE %d +FLAGS (\\Deleted)", number));
 }
 
-static struct method imap =
+const static struct method imap =
 {
     "IMAP",            /* Internet Message Access Protocol */
     143,               /* standard IMAP2bis/IMAP4 port */