diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2014-02-24 18:06:13 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2014-02-24 18:06:13 +0000 |
commit | 7126722738c20bac0b06770c59408ea7da83033a (patch) | |
tree | c10603b0d2ae8e74ad4e7bec368f2a3445556d84 /usr.sbin/smtpd/mta_session.c | |
parent | 1cf4ba14e00b307212da41f722d26435f7afae5e (diff) |
fix off by one leading to invalid host stats tree
Diffstat (limited to 'usr.sbin/smtpd/mta_session.c')
-rw-r--r-- | usr.sbin/smtpd/mta_session.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/smtpd/mta_session.c b/usr.sbin/smtpd/mta_session.c index 3443f49d166..0d21f7d46d9 100644 --- a/usr.sbin/smtpd/mta_session.c +++ b/usr.sbin/smtpd/mta_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mta_session.c,v 1.54 2014/02/04 15:44:05 eric Exp $ */ +/* $OpenBSD: mta_session.c,v 1.55 2014/02/24 18:06:12 eric Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -1023,7 +1023,7 @@ mta_response(struct mta_session *s, char *line) buf, delivery, line); if (domain) - mta_hoststat_update(domain + 1, e->status); + mta_hoststat_update(domain, e->status); mta_delivery_notify(e); if (s->relay->limits->max_failures_per_session && @@ -1383,9 +1383,10 @@ mta_flush_task(struct mta_session *s, int delivery, const char *error, size_t co domain = strchr(e->dest, '@'); if (domain) { - mta_hoststat_update(domain + 1, error); + domain++; + mta_hoststat_update(domain, error); if (cache) - mta_hoststat_cache(domain + 1, e->id); + mta_hoststat_cache(domain, e->id); } n++; |