summaryrefslogtreecommitdiffstats
path: root/qmail-qmtpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'qmail-qmtpd.c')
-rw-r--r--qmail-qmtpd.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/qmail-qmtpd.c b/qmail-qmtpd.c
index 85a0f99..1055274 100644
--- a/qmail-qmtpd.c
+++ b/qmail-qmtpd.c
@@ -1,3 +1,4 @@
1#include <unistd.h>
1#include "stralloc.h" 2#include "stralloc.h"
2#include "substdio.h" 3#include "substdio.h"
3#include "qmail.h" 4#include "qmail.h"
@@ -8,10 +9,10 @@
8#include "sig.h" 9#include "sig.h"
9#include "rcpthosts.h" 10#include "rcpthosts.h"
10#include "auto_qmail.h" 11#include "auto_qmail.h"
11#include "readwrite.h"
12#include "control.h" 12#include "control.h"
13#include "received.h" 13#include "received.h"
14#include "exit.h" 14#include "exit.h"
15#include "scan.h"
15 16
16void badproto() { _exit(100); } 17void badproto() { _exit(100); }
17void resources() { _exit(111); } 18void resources() { _exit(111); }
@@ -25,9 +26,9 @@ extern void realrcptto_start();
25extern int realrcptto(); 26extern int realrcptto();
26extern int realrcptto_deny(); 27extern int realrcptto_deny();
27 28
28int safewrite(fd,buf,len) int fd; char *buf; int len; 29ssize_t safewrite(fd,buf,len) int fd; char *buf; int len;
29{ 30{
30 int r; 31 ssize_t r;
31 r = write(fd,buf,len); 32 r = write(fd,buf,len);
32 if (r <= 0) _exit(0); 33 if (r <= 0) _exit(0);
33 return r; 34 return r;
@@ -36,9 +37,9 @@ int safewrite(fd,buf,len) int fd; char *buf; int len;
36char ssoutbuf[256]; 37char ssoutbuf[256];
37substdio ssout = SUBSTDIO_FDBUF(safewrite,1,ssoutbuf,sizeof ssoutbuf); 38substdio ssout = SUBSTDIO_FDBUF(safewrite,1,ssoutbuf,sizeof ssoutbuf);
38 39
39int saferead(fd,buf,len) int fd; char *buf; int len; 40ssize_t saferead(fd,buf,len) int fd; char *buf; int len;
40{ 41{
41 int r; 42 ssize_t r;
42 substdio_flush(&ssout); 43 substdio_flush(&ssout);
43 r = read(fd,buf,len); 44 r = read(fd,buf,len);
44 if (r <= 0) _exit(0); 45 if (r <= 0) _exit(0);
@@ -84,7 +85,7 @@ stralloc failure = {0};
84char *relayclient; 85char *relayclient;
85int relayclientlen; 86int relayclientlen;
86 87
87main() 88int main()
88{ 89{
89 char ch; 90 char ch;
90 int i; 91 int i;
@@ -283,4 +284,5 @@ main()
283 284
284 /* ssout will be flushed when we read from the network again */ 285 /* ssout will be flushed when we read from the network again */
285 } 286 }
287 return 0;
286} 288}