summaryrefslogtreecommitdiff
path: root/qmail-pop3d.c
diff options
context:
space:
mode:
authorJohn Denker <jsd@av8n.com>2012-06-03 16:17:17 -0700
committerJohn Denker <jsd@av8n.com>2012-07-13 18:39:07 -0700
commitd878633536cadc60e6d836c946673903dbac263a (patch)
tree75e597d16d6d2ae60dba655eb909c196f8decff1 /qmail-pop3d.c
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
Diffstat (limited to 'qmail-pop3d.c')
-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");