aboutsummaryrefslogtreecommitdiffstats
path: root/imap.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-10-06 20:34:29 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-10-06 20:34:29 +0000
commit4cb267590512956e78cc054f816fc6294088ce2b (patch)
treed77223b3537ccb534e1a0a591ad671c52f44b0b7 /imap.c
parentf91581a8545a79da9d400e981de6f1ef73d2569a (diff)
downloadfetchmail-4cb267590512956e78cc054f816fc6294088ce2b.tar.gz
fetchmail-4cb267590512956e78cc054f816fc6294088ce2b.tar.bz2
fetchmail-4cb267590512956e78cc054f816fc6294088ce2b.zip
Better behavior on line hits.
svn path=/trunk/; revision=1485
Diffstat (limited to 'imap.c')
-rw-r--r--imap.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/imap.c b/imap.c
index 1d8dbeb1..317a3394 100644
--- a/imap.c
+++ b/imap.c
@@ -415,6 +415,10 @@ static int imap_getrange(int sock,
ok = 0;
if (deletions && ctl->expunge > 1)
ok = gen_transact(sock, "EXPUNGE");
+#ifdef IMAP_UID /* not used */
+ if (!ok)
+ expunge_uids(ctl);
+#endif /* IMAP_UID */
if (ok || gen_transact(sock, "NOOP"))
{
error(0, 0, "re-poll failed");
@@ -479,7 +483,7 @@ static int imap_is_old(int sock, struct query *ctl, int number)
{
int ok;
- /* expunged change the fetch numbers */
+ /* expunges change the fetch numbers */
number -= expunged;
if ((ok = gen_transact(sock, "FETCH %d FLAGS", number)) != 0)
@@ -494,7 +498,7 @@ static int imap_fetch_headers(int sock, struct query *ctl,int number,int *lenp)
char buf [POPBUFSIZE+1];
int num;
- /* expunged change the fetch numbers */
+ /* expunges change the fetch numbers */
number -= expunged;
/*
@@ -524,7 +528,7 @@ static int imap_fetch_body(int sock, struct query *ctl, int number, int *lenp)
char buf [POPBUFSIZE+1], *cp;
int num;
- /* expunged change the fetch numbers */
+ /* expunges change the fetch numbers */
number -= expunged;
/*
@@ -582,7 +586,7 @@ static int imap_fetch_body(int sock, struct query *ctl, int number, int *lenp)
static int imap_trail(int sock, struct query *ctl, int number)
/* discard tail of FETCH response after reading message text */
{
- /* expunged change the fetch numbers */
+ /* expunges change the fetch numbers */
/* number -= expunged; */
for (;;)
@@ -606,7 +610,7 @@ static int imap_delete(int sock, struct query *ctl, int number)
{
int ok;
- /* expunged change the fetch numbers */
+ /* expunges change the fetch numbers */
number -= expunged;
/*
@@ -631,6 +635,10 @@ static int imap_delete(int sock, struct query *ctl, int number)
if ((ok = gen_transact(sock, "EXPUNGE")))
return(ok);
+#ifdef IMAP_UID /* not used */
+ expunge_uids(ctl);
+#endif /* IMAP_UID */
+
expunged = deletions;
}
@@ -647,6 +655,10 @@ static int imap_logout(int sock, struct query *ctl)
if ((ok = gen_transact(sock, "EXPUNGE")))
return(ok);
+
+#ifdef IMAP_UID /* not used */
+ expunge_uids(ctl);
+#endif /* IMAP_UID */
}
return(gen_transact(sock, "LOGOUT"));