summaryrefslogtreecommitdiffstats
path: root/tcpto_clean.c
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2013-02-04 00:08:53 +0100
committermanuel <manuel@mausz.at>2013-02-04 00:08:53 +0100
commit69aec538b456402170dc723af417ba5c05389c32 (patch)
treee6f34c543f17c6392447ea337b2e2868212424d1 /tcpto_clean.c
downloadqmail-69aec538b456402170dc723af417ba5c05389c32.tar.gz
qmail-69aec538b456402170dc723af417ba5c05389c32.tar.bz2
qmail-69aec538b456402170dc723af417ba5c05389c32.zip
qmail 1.03 import
Diffstat (limited to 'tcpto_clean.c')
-rw-r--r--tcpto_clean.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/tcpto_clean.c b/tcpto_clean.c
new file mode 100644
index 0000000..ed48506
--- /dev/null
+++ b/tcpto_clean.c
@@ -0,0 +1,20 @@
1#include "tcpto.h"
2#include "open.h"
3#include "substdio.h"
4#include "readwrite.h"
5
6char tcpto_cleanbuf[1024];
7
8void tcpto_clean() /* running from queue/mess */
9{
10 int fd;
11 int i;
12 substdio ss;
13
14 fd = open_write("../lock/tcpto");
15 if (fd == -1) return;
16 substdio_fdbuf(&ss,write,fd,tcpto_cleanbuf,sizeof(tcpto_cleanbuf));
17 for (i = 0;i < sizeof(tcpto_cleanbuf);++i) substdio_put(&ss,"",1);
18 substdio_flush(&ss); /* if it fails, bummer */
19 close(fd);
20}