diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-09-28 05:02:42 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-09-28 05:02:42 +0000 |
commit | 14992ea3f8d34e9784f062b6c890b326bb8b46ec (patch) | |
tree | 66b468a50c6b80f3ac4e4ffb785e50ce07ab64f7 /driver.c | |
parent | ea57c21bd08ef4e2c1e075d013cfa24465a1021c (diff) | |
download | fetchmail-14992ea3f8d34e9784f062b6c890b326bb8b46ec.tar.gz fetchmail-14992ea3f8d34e9784f062b6c890b326bb8b46ec.tar.bz2 fetchmail-14992ea3f8d34e9784f062b6c890b326bb8b46ec.zip |
With any luck, this is a correct implementation of UIDL support.
svn path=/trunk/; revision=168
Diffstat (limited to 'driver.c')
-rw-r--r-- | driver.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -592,7 +592,7 @@ struct method *proto; if (ok != 0) goto cleanUp; - /* compute count and first */ + /* compute count and first, and get UID list if possible */ if ((*protocol->getrange)(socket, queryctl, &count, &first) != 0) goto cleanUp; @@ -651,6 +651,11 @@ struct method *proto; ok = 0; /* retrieval suppressed */ else { + /* we may want to reject this message based on its UID */ + if (!queryctl->fetchall && *protocol->is_old) + if ((*protocol->is_old)(socket, queryctl, num)) + continue; + /* request a message */ (*protocol->fetch)(socket, num, linelimit, &len); if (outlevel == O_VERBOSE) @@ -697,12 +702,12 @@ struct method *proto; } /* maybe we delete this message now? */ - if (protocol->delete_cmd) + if (protocol->delete) { if ((num < first && queryctl->flush) || !queryctl->keep) { if (outlevel > O_SILENT && outlevel < O_VERBOSE) fprintf(stderr,"flushing message %d\n", num); - ok = gen_transact(socket, protocol->delete_cmd, num); + ok = (protocol->delete)(socket, queryctl, num); if (ok != 0) goto cleanUp; } |