diff options
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; } |