From dea547a71036ae3445a5a612f6afd00b76ed721a Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 15 May 1997 20:12:53 +0000 Subject: Add multiple-folder support. svn path=/trunk/; revision=1012 --- imap.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'imap.c') diff --git a/imap.c b/imap.c index 938c5f0a..035942f7 100644 --- a/imap.c +++ b/imap.c @@ -117,16 +117,17 @@ int imap_getauth(int sock, struct query *ctl, char *buf) return(PS_SUCCESS); } -static int imap_getrange(int sock, struct query *ctl, int*countp, int*newp) +static int imap_getrange(int sock, + struct query *ctl, + const char *folder, + int *countp, int *newp) /* get range of messages to be fetched */ { int ok; /* find out how many messages are waiting */ recent = unseen = 0; - ok = gen_transact(sock, - "SELECT %s", - ctl->mailbox ? ctl->mailbox : "INBOX"); + ok = gen_transact(sock, "SELECT %s", folder ? folder : "INBOX"); if (ok != 0) { error(0, 0, "mailbox selection failed"); -- cgit v1.2.3