diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2009-11-10 00:21:47 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2009-11-10 00:21:47 +0000 |
commit | 18d0833c594f70a1d3a9c405e647f7a1b6f83a5f (patch) | |
tree | f61f8429cabdb7e8f8614b8bee4d1a36b3b79946 /usr.sbin | |
parent | 76c185eb6eafe7431ede912549c83da910e762ae (diff) |
cosmethic changes, code reordering, no functionnal change
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/smtpd/lka.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/usr.sbin/smtpd/lka.c b/usr.sbin/smtpd/lka.c index 4de2db8847d..67af41e52e0 100644 --- a/usr.sbin/smtpd/lka.c +++ b/usr.sbin/smtpd/lka.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lka.c,v 1.86 2009/11/10 00:13:33 gilles Exp $ */ +/* $OpenBSD: lka.c,v 1.87 2009/11/10 00:21:46 gilles Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -344,6 +344,7 @@ lka_dispatch_mfa(int sig, short event, void *p) struct submit_status *ss = imsg.data; struct lkasession *lkasession; struct path *path; + int err = 0; IMSG_SIZE_CHECK(ss); @@ -352,34 +353,33 @@ lka_dispatch_mfa(int sig, short event, void *p) lkasession = lka_session_init(env, ss); if (! lka_resolve_path(env, lkasession, path)) { - lka_session_fail(env, lkasession, ss); - break; + err = 1; } - if (path->flags & F_PATH_ACCOUNT) { + else if (path->flags & F_PATH_ACCOUNT) { lka_request_forwardfile(env, lkasession, path->pw_name); - break; } - if (path->flags & F_PATH_RELAY) { + else if (path->flags & F_PATH_RELAY) { path = path_dup(&ss->u.path); TAILQ_INSERT_TAIL(&lkasession->deliverylist, path, entry); } - if (path->flags & F_PATH_ALIAS) { + else if (path->flags & F_PATH_ALIAS) { if (! aliases_get(env, ss->u.path.rule.r_amap, - &lkasession->expandtree, ss->u.path.user)) { - lka_session_fail(env, lkasession, ss); - break; - } + &lkasession->expandtree, ss->u.path.user)) + err = 1; } - if (path->flags & F_PATH_VIRTUAL) { + else if (path->flags & F_PATH_VIRTUAL) { if (! aliases_virtual_get(env, ss->u.path.cond->c_map, - &lkasession->expandtree, &ss->u.path)) { - lka_session_fail(env, lkasession, ss); - break; - } + &lkasession->expandtree, &ss->u.path)) + err = 1; + } + + if (err) { + lka_session_fail(env, lkasession, ss); + break; } lka_expand_pickup(env, lkasession); |