summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/map_static.c
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2012-11-12 14:58:54 +0000
committerEric Faurot <eric@cvs.openbsd.org>2012-11-12 14:58:54 +0000
commitb978afa593739cd00f56cc9f5737d18e8575bc8b (patch)
tree5c19c4f60f92f0ddd3977d36cea0a163bdb6e457 /usr.sbin/smtpd/map_static.c
parent98b597918008f218253c1c75aca5d02f8cccae79 (diff)
Cleanups and improvements:
* Log more events (especially client session) and use a better scheme for that: each messages is prefixed with a token to easily identify its class: - info/warn/debug: general server messages - smtp-in: smtp client connections - relay: status update for relayed messages - delivery: status update for local deliveries * Implement "smtpctl monitor" to display updates of selected internal counters. * When reloading the on-disk queue at startup do not commit a message if no envelope was submitted for that message. * Remove unused stuff in the config parser. ok gilles@
Diffstat (limited to 'usr.sbin/smtpd/map_static.c')
-rw-r--r--usr.sbin/smtpd/map_static.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/smtpd/map_static.c b/usr.sbin/smtpd/map_static.c
index c66da1025b1..9f998243fec 100644
--- a/usr.sbin/smtpd/map_static.c
+++ b/usr.sbin/smtpd/map_static.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: map_static.c,v 1.8 2012/10/14 11:58:23 gilles Exp $ */
+/* $OpenBSD: map_static.c,v 1.9 2012/11/12 14:58:53 eric Exp $ */
/*
* Copyright (c) 2012 Gilles Chehade <gilles@openbsd.org>
@@ -78,10 +78,10 @@ map_static_lookup(void *hdl, const char *key, enum map_kind kind)
line = NULL;
TAILQ_FOREACH(me, &m->m_contents, me_entry) {
- if (strcmp(key, me->me_key.med_string) == 0) {
- if (me->me_val.med_string == NULL)
+ if (strcmp(key, me->me_key) == 0) {
+ if (me->me_val == NULL)
return NULL;
- line = strdup(me->me_val.med_string);
+ line = strdup(me->me_val);
break;
}
}
@@ -126,7 +126,7 @@ map_static_compare(void *hdl, const char *key, enum map_kind kind,
int ret = 0;
TAILQ_FOREACH(me, &m->m_contents, me_entry) {
- if (! func(key, me->me_key.med_string))
+ if (! func(key, me->me_key))
continue;
ret = 1;
break;