From df46e177477e50b30d7425c8b7c05c0e54a9113e Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 14 Jan 1997 17:21:05 +0000 Subject: Expunge fix. svn path=/trunk/; revision=759 --- imap.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'imap.c') diff --git a/imap.c b/imap.c index 404f75c0..3a760cac 100644 --- a/imap.c +++ b/imap.c @@ -202,12 +202,17 @@ static int imap_trail(FILE *sockfp, struct query *ctl, int number) static int imap_delete(FILE *sockfp, struct query *ctl, int number) /* set delete flag for given message */ { + int ok; + /* use SILENT if possible as a minor throughput optimization */ - return(gen_transact(sockfp, + if ((ok = gen_transact(sockfp, imap4 ? "STORE %d +FLAGS.SILENT (\\Deleted)" : "STORE %d +FLAGS (\\Deleted)", - number)); + number))) + return(ok); + + return(gen_transact(sockfp, "EXPUNGE")); } const static struct method imap = @@ -224,7 +229,6 @@ const static struct method imap = imap_fetch, /* request given message */ imap_trail, /* eat message trailer */ imap_delete, /* set IMAP delete flag */ - "EXPUNGE", /* the IMAP expunge command */ "LOGOUT", /* the IMAP exit command */ }; -- cgit v1.2.3