summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/smtpctl.c
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2013-10-25 21:31:24 +0000
committerEric Faurot <eric@cvs.openbsd.org>2013-10-25 21:31:24 +0000
commitdef10dc7aa9ba0531c9342718772e2530a9f10eb (patch)
treec4ea65226619f26a40bdb71f2627636835c25be3 /usr.sbin/smtpd/smtpctl.c
parentf0d70e024329d663dcdba5b26e039403acb888c6 (diff)
local enqueuer improvements:
- parse the whole input before trying to establish the connection to the local socket: fixes timeout problems when reading the output of a long running program. - use sendmail(8)-like exit status.
Diffstat (limited to 'usr.sbin/smtpd/smtpctl.c')
-rw-r--r--usr.sbin/smtpd/smtpctl.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.sbin/smtpd/smtpctl.c b/usr.sbin/smtpd/smtpctl.c
index 006fed00cac..757bb5650a9 100644
--- a/usr.sbin/smtpd/smtpctl.c
+++ b/usr.sbin/smtpd/smtpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpctl.c,v 1.109 2013/10/25 18:58:10 eric Exp $ */
+/* $OpenBSD: smtpctl.c,v 1.110 2013/10/25 21:31:23 eric Exp $ */
/*
* Copyright (c) 2013 Eric Faurot <eric@openbsd.org>
@@ -725,7 +725,7 @@ do_show_stats(int argc, struct parameter *argv)
(long long)kv.val.u.tv.tv_usec);
break;
case STAT_TIMESPEC:
- printf("%s=%lli.%06li\n",
+ printf("%s=%lld.%06ld\n",
kv.key,
(long long)kv.val.u.ts.tv_sec * 1000000 +
kv.val.u.ts.tv_nsec / 1000000,
@@ -795,9 +795,7 @@ main(int argc, char **argv)
if (strcmp(__progname, "sendmail") == 0 ||
strcmp(__progname, "send-mail") == 0) {
sendmail = 1;
- if (srv_connect())
- return (enqueue(argc, argv));
- return (enqueue_offline(argc, argv));
+ return (enqueue(argc, argv));
}
if (geteuid())