From 490c21cd94489729f34b4c4b690a4c103a78ec11 Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 27 Jan 2014 15:37:28 +0100 Subject: make commands argument mandatory --- qmail-pop3d.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'qmail-pop3d.c') diff --git a/qmail-pop3d.c b/qmail-pop3d.c index d2a6f87..e299339 100644 --- a/qmail-pop3d.c +++ b/qmail-pop3d.c @@ -67,14 +67,14 @@ void die_nomaildir() { err("this user has no $HOME/Maildir"); die(); } void die_scan() { err("unable to scan $HOME/Maildir"); die(); } void err_syntax() { err("syntax error"); } -void err_unimpl() { err("unimplemented"); } +void err_unimpl(arg) char *arg; { err("unimplemented"); } void err_deleted() { err("already deleted"); } void err_nozero() { err("messages are counted from 1"); } void err_toobig() { err("not that many messages"); } void err_nosuch() { err("unable to open that message"); } void err_nounlink() { err("unable to unlink all deleted messages"); } -void okay() { substdio_puts(&ssout,"+OK \r\n"); flush(); } +void okay(arg) char *arg; { substdio_puts(&ssout,"+OK \r\n"); flush(); } void printfn(fn) char *fn; { @@ -147,7 +147,7 @@ void getlist() } } -void pop3_stat() +void pop3_stat(arg) char *arg; { int i; unsigned long total; @@ -162,15 +162,15 @@ void pop3_stat() flush(); } -void pop3_rset() +void pop3_rset(arg) char *arg; { int i; for (i = 0;i < numm;++i) m[i].flagdeleted = 0; last = 0; - okay(); + okay(0); } -void pop3_last() +void pop3_last(arg) char *arg; { substdio_puts(&ssout,"+OK "); put(strnum,fmt_uint(strnum,last)); @@ -178,7 +178,7 @@ void pop3_last() flush(); } -void pop3_quit() +void pop3_quit(arg) char *arg; { int i; char quotabuf[QUOTABUFSIZE]; @@ -231,7 +231,7 @@ void pop3_quit() if (quotafd >= 0) close(quotafd); } } - okay(); + okay(0); die(); } @@ -253,7 +253,7 @@ void pop3_dele(arg) char *arg; if (i == -1) return; m[i].flagdeleted = 1; if (i + 1 > last) last = i + 1; - okay(); + okay(0); } void list(i,flaguidl) @@ -277,7 +277,7 @@ void dolisting(arg,flaguidl) char *arg; int flaguidl; list(i,flaguidl); } else { - okay(); + okay(0); for (i = 0;i < numm;++i) if (!m[i].flagdeleted) list(i,flaguidl); @@ -306,7 +306,7 @@ void pop3_top(arg) char *arg; fd = open_read(m[i].fn); if (fd == -1) { err_nosuch(); return; } - okay(); + okay(0); substdio_fdbuf(&ssmsg,read,fd,ssmsgbuf,sizeof(ssmsgbuf)); blast(&ssmsg,limit); close(fd); @@ -338,7 +338,7 @@ char **argv; getlist(); - okay(); + okay(0); commands(&ssin,pop3commands); die(); } -- cgit v1.2.3