summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Denker <jsd@av8n.com>2012-06-03 23:17:17 (GMT)
committerJohn Denker <jsd@av8n.com>2012-07-14 01:39:07 (GMT)
commitd878633536cadc60e6d836c946673903dbac263a (patch)
tree75e597d16d6d2ae60dba655eb909c196f8decff1
parent9c26652d660cd4cc91be1e24f94a9aaf708bb99b (diff)
In qmail-pop3d's reponse to STAT, deleted messages are no
longer counted in the total --- in compliance with RFC 1939. Credit: I. Dwayne Koonce
-rw-r--r--qmail-pop3d.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/qmail-pop3d.c b/qmail-pop3d.c
index 0ca4f9c..2228a4d 100644
--- a/qmail-pop3d.c
+++ b/qmail-pop3d.c
@@ -148,13 +148,13 @@ void getlist()
void pop3_stat(arg) char *arg;
{
- int i;
+ int i, j=0;
unsigned long total;
total = 0;
- for (i = 0;i < numm;++i) if (!m[i].flagdeleted) total += m[i].size;
+ for (i = 0;i < numm;++i) if (!m[i].flagdeleted) { total += m[i].size; j++; }
puts("+OK ");
- put(strnum,fmt_uint(strnum,numm));
+ put(strnum,fmt_uint(strnum,j));
puts(" ");
put(strnum,fmt_ulong(strnum,total));
puts("\r\n");