summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/control.c
diff options
context:
space:
mode:
authorCharles Longeau <chl@cvs.openbsd.org>2010-06-02 19:16:54 +0000
committerCharles Longeau <chl@cvs.openbsd.org>2010-06-02 19:16:54 +0000
commit3c6ca140406ff1e9c8d2cad836bdd5ceeff3ec94 (patch)
tree8621ab9982bc1ce7607251b8d52bb08a162a1577 /usr.sbin/smtpd/control.c
parent7506a99adac8ba760239e941a4ed33832b15643b (diff)
check event_dispatch() return value
ok jacekm@
Diffstat (limited to 'usr.sbin/smtpd/control.c')
-rw-r--r--usr.sbin/smtpd/control.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/control.c b/usr.sbin/smtpd/control.c
index d02df1c7770..5215b1a8aa0 100644
--- a/usr.sbin/smtpd/control.c
+++ b/usr.sbin/smtpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.52 2010/06/01 23:06:23 jacekm Exp $ */
+/* $OpenBSD: control.c,v 1.53 2010/06/02 19:16:53 chl Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -217,7 +217,8 @@ control(struct smtpd *env)
config_pipes(env, peers, nitems(peers));
config_peers(env, peers, nitems(peers));
control_listen(env);
- event_dispatch();
+ if (event_dispatch() < 0)
+ fatal("event_dispatch");
control_shutdown();
return (0);