aboutsummaryrefslogtreecommitdiffstats
path: root/imap.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2000-01-17 02:18:39 +0000
committerEric S. Raymond <esr@thyrsus.com>2000-01-17 02:18:39 +0000
commitf1fa3732087b628f3950c4624319257b02d4f8d7 (patch)
treec304596b462128c21510ac5000b3b9a7822c8191 /imap.c
parent91edebd962aa90b42cb75b39064dd7e4e27841f1 (diff)
downloadfetchmail-f1fa3732087b628f3950c4624319257b02d4f8d7.tar.gz
fetchmail-f1fa3732087b628f3950c4624319257b02d4f8d7.tar.bz2
fetchmail-f1fa3732087b628f3950c4624319257b02d4f8d7.zip
drive.c now tracks stage.
svn path=/trunk/; revision=2712
Diffstat (limited to 'imap.c')
-rw-r--r--imap.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/imap.c b/imap.c
index df787da6..eb57bf4a 100644
--- a/imap.c
+++ b/imap.c
@@ -62,13 +62,6 @@ extern char *strstr(); /* needed on sysV68 R3V7.1. */
#define IMAP4 0 /* IMAP4 rev 0, RFC1730 */
#define IMAP4rev1 1 /* IMAP4 rev 1, RFC2060 */
-static int imap_phase;
-#define PHASE_GETAUTH 0
-#define PHASE_GETRANGE 1
-#define PHASE_GETSIZES 2
-#define PHASE_FETCH 3
-#define PHASE_LOGOUT 4
-
static int count, seen, recent, unseen, deletions, imap_version, preauth;
static int expunged, expunge_period;
static char capabilities[MSGBUFSIZE+1];
@@ -152,7 +145,7 @@ int imap_ok(int sock, char *argbuf)
return(PS_ERROR);
else if (strncmp(cp, "NO", 2) == 0)
{
- if (imap_phase == PHASE_GETAUTH)
+ if (stage == STAGE_GETAUTH)
return(PS_AUTHFAIL); /* RFC2060, 6.2.2 */
else
return(PS_ERROR);
@@ -863,8 +856,6 @@ int imap_getauth(int sock, struct query *ctl, char *greeting)
{
int ok = 0;
- imap_phase = PHASE_GETAUTH;
-
/* probe to see if we're running IMAP4 and can use RFC822.PEEK */
capabilities[0] = '\0';
if ((ok = gen_transact(sock, "CAPABILITY")) == PS_SUCCESS)
@@ -1042,8 +1033,6 @@ static int imap_getrange(int sock,
{
int ok;
- imap_phase = PHASE_GETRANGE;
-
/* find out how many messages are waiting */
*bytes = recent = unseen = -1;
@@ -1109,8 +1098,6 @@ static int imap_getsizes(int sock, int count, int *sizes)
{
char buf [MSGBUFSIZE+1];
- imap_phase = PHASE_GETSIZES;
-
/*
* Some servers (as in, PMDF5.1-9.1 under OpenVMS 6.1)
* won't accept 1:1 as valid set syntax. Some implementors
@@ -1132,8 +1119,6 @@ static int imap_getsizes(int sock, int count, int *sizes)
sizes[num - 1] = size;
}
- imap_phase = PHASE_FETCH;
-
return(PS_SUCCESS);
}
@@ -1331,8 +1316,6 @@ static int imap_delete(int sock, struct query *ctl, int number)
static int imap_logout(int sock, struct query *ctl)
/* send logout command */
{
- imap_phase = PHASE_LOGOUT;
-
/* if any un-expunged deletions remain, ship an expunge now */
if (deletions)
internal_expunge(sock);