summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
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
parent7506a99adac8ba760239e941a4ed33832b15643b (diff)
check event_dispatch() return value
ok jacekm@
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r--usr.sbin/smtpd/control.c5
-rw-r--r--usr.sbin/smtpd/dns.c5
-rw-r--r--usr.sbin/smtpd/enqueue.c5
-rw-r--r--usr.sbin/smtpd/lka.c5
-rw-r--r--usr.sbin/smtpd/mda.c4
-rw-r--r--usr.sbin/smtpd/mfa.c5
-rw-r--r--usr.sbin/smtpd/mta.c5
-rw-r--r--usr.sbin/smtpd/queue.c5
-rw-r--r--usr.sbin/smtpd/smtp.c5
-rw-r--r--usr.sbin/smtpd/smtpd.c5
10 files changed, 29 insertions, 20 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);
diff --git a/usr.sbin/smtpd/dns.c b/usr.sbin/smtpd/dns.c
index cbf7f0a237a..c769f2ec498 100644
--- a/usr.sbin/smtpd/dns.c
+++ b/usr.sbin/smtpd/dns.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dns.c,v 1.20 2009/11/14 18:49:25 chl Exp $ */
+/* $OpenBSD: dns.c,v 1.21 2010/06/02 19:16:53 chl Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -226,7 +226,8 @@ dns(void)
event_set(&iev->ev, iev->ibuf.fd, iev->events, iev->handler, iev->data);
event_add(&iev->ev, NULL);
- event_dispatch();
+ if (event_dispatch() < 0)
+ fatal("event_dispatch");
_exit(0);
}
diff --git a/usr.sbin/smtpd/enqueue.c b/usr.sbin/smtpd/enqueue.c
index b900c15d0cd..d514a96d4e4 100644
--- a/usr.sbin/smtpd/enqueue.c
+++ b/usr.sbin/smtpd/enqueue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: enqueue.c,v 1.36 2010/06/01 23:06:23 jacekm Exp $ */
+/* $OpenBSD: enqueue.c,v 1.37 2010/06/02 19:16:53 chl Exp $ */
/*
* Copyright (c) 2005 Henning Brauer <henning@bulabula.org>
@@ -237,7 +237,8 @@ enqueue(int argc, char *argv[])
event_set(&msg.ev, msg.fd, EV_READ|EV_WRITE, enqueue_event, NULL);
event_add(&msg.ev, &msg.pcb->timeout);
- event_dispatch();
+ if (event_dispatch() < 0)
+ err(1, "event_dispatch");
client_close(msg.pcb);
exit(0);
diff --git a/usr.sbin/smtpd/lka.c b/usr.sbin/smtpd/lka.c
index 683cc8dfe6d..0f16248d50a 100644
--- a/usr.sbin/smtpd/lka.c
+++ b/usr.sbin/smtpd/lka.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lka.c,v 1.113 2010/06/01 23:06:23 jacekm Exp $ */
+/* $OpenBSD: lka.c,v 1.114 2010/06/02 19:16:53 chl Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -358,7 +358,8 @@ lka(struct smtpd *env)
config_peers(env, peers, nitems(peers));
lka_setup_events(env);
- event_dispatch();
+ if (event_dispatch() < 0)
+ fatal("event_dispatch");
lka_shutdown();
return (0);
diff --git a/usr.sbin/smtpd/mda.c b/usr.sbin/smtpd/mda.c
index e2cc15a9aad..d71b74b72ee 100644
--- a/usr.sbin/smtpd/mda.c
+++ b/usr.sbin/smtpd/mda.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mda.c,v 1.47 2010/06/01 23:06:23 jacekm Exp $ */
+/* $OpenBSD: mda.c,v 1.48 2010/06/02 19:16:53 chl Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -312,7 +312,7 @@ mda(struct smtpd *env)
mda_setup_events(env);
if (event_dispatch() < 0)
- log_warn("event_dispatch");
+ fatal("event_dispatch");
mda_shutdown();
return (0);
diff --git a/usr.sbin/smtpd/mfa.c b/usr.sbin/smtpd/mfa.c
index 1d0da4dcd72..2c5cab35722 100644
--- a/usr.sbin/smtpd/mfa.c
+++ b/usr.sbin/smtpd/mfa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfa.c,v 1.48 2010/06/01 23:06:23 jacekm Exp $ */
+/* $OpenBSD: mfa.c,v 1.49 2010/06/02 19:16:53 chl Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -175,7 +175,8 @@ mfa(struct smtpd *env)
config_peers(env, peers, nitems(peers));
mfa_setup_events(env);
- event_dispatch();
+ if (event_dispatch() < 0)
+ fatal("event_dispatch");
mfa_shutdown();
return (0);
diff --git a/usr.sbin/smtpd/mta.c b/usr.sbin/smtpd/mta.c
index f4a140ea567..c3d99197f06 100644
--- a/usr.sbin/smtpd/mta.c
+++ b/usr.sbin/smtpd/mta.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mta.c,v 1.91 2010/06/01 23:06:23 jacekm Exp $ */
+/* $OpenBSD: mta.c,v 1.92 2010/06/02 19:16:53 chl Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -275,7 +275,8 @@ mta(struct smtpd *env)
SPLAY_INIT(&env->mta_sessions);
- event_dispatch();
+ if (event_dispatch() < 0)
+ fatal("event_dispatch");
mta_shutdown();
return (0);
diff --git a/usr.sbin/smtpd/queue.c b/usr.sbin/smtpd/queue.c
index 6b248cd7386..029dfd3bd39 100644
--- a/usr.sbin/smtpd/queue.c
+++ b/usr.sbin/smtpd/queue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: queue.c,v 1.86 2010/06/01 23:06:23 jacekm Exp $ */
+/* $OpenBSD: queue.c,v 1.87 2010/06/02 19:16:53 chl Exp $ */
/*
* Copyright (c) 2008-2010 Jacek Masiulaniec <jacekm@dobremiasto.net>
@@ -656,7 +656,8 @@ queue(struct smtpd *env)
signal(SIGPIPE, SIG_IGN);
signal(SIGHUP, SIG_IGN);
- event_dispatch();
+ if (event_dispatch() < 0)
+ fatal("event_dispatch");
queue_shutdown();
return (0);
diff --git a/usr.sbin/smtpd/smtp.c b/usr.sbin/smtpd/smtp.c
index 5f3978e671c..d7a2e5a83fe 100644
--- a/usr.sbin/smtpd/smtp.c
+++ b/usr.sbin/smtpd/smtp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtp.c,v 1.74 2010/06/01 23:06:23 jacekm Exp $ */
+/* $OpenBSD: smtp.c,v 1.75 2010/06/02 19:16:53 chl Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -337,7 +337,8 @@ smtp(struct smtpd *env)
config_pipes(env, peers, nitems(peers));
config_peers(env, peers, nitems(peers));
- event_dispatch();
+ if (event_dispatch() < 0)
+ fatal("event_dispatch");
smtp_shutdown();
return (0);
diff --git a/usr.sbin/smtpd/smtpd.c b/usr.sbin/smtpd/smtpd.c
index 7082fae5037..6827d2e78e2 100644
--- a/usr.sbin/smtpd/smtpd.c
+++ b/usr.sbin/smtpd/smtpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.c,v 1.111 2010/06/01 23:06:25 jacekm Exp $ */
+/* $OpenBSD: smtpd.c,v 1.112 2010/06/02 19:16:53 chl Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -520,7 +520,8 @@ main(int argc, char *argv[])
parent_enqueue_offline(&env);
- event_dispatch();
+ if (event_dispatch() < 0)
+ fatal("event_dispatch");
return (0);
}