diff options
author | Gilles Chehade <gilles@poolp.org> | 2012-11-16 17:01:52 +0100 |
---|---|---|
committer | Gilles Chehade <gilles@poolp.org> | 2012-11-16 17:01:52 +0100 |
commit | 47afc730cad43e7d0b97ad14dde452e0e381520a (patch) | |
tree | 7be682fa89176d41f3266c4ec402caba05e074e9 /smtpd/config.c | |
parent | Merge branch 'master' into dict (diff) | |
download | OpenSMTPD-47afc730cad43e7d0b97ad14dde452e0e381520a.tar.xz OpenSMTPD-47afc730cad43e7d0b97ad14dde452e0e381520a.zip |
- byebye struct mapel, you were horrendous and now you're dead
- introduce dict_*-based static maps
Diffstat (limited to 'smtpd/config.c')
-rw-r--r-- | smtpd/config.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/smtpd/config.c b/smtpd/config.c index edb62a56..3324279d 100644 --- a/smtpd/config.c +++ b/smtpd/config.c @@ -61,7 +61,7 @@ purge_config(uint8_t what) struct table *t; struct rule *r; struct ssl *s; - struct mapel *me; + void *p; if (what & PURGE_LISTENERS) { while ((l = TAILQ_FIRST(env->sc_listeners)) != NULL) { @@ -74,10 +74,10 @@ purge_config(uint8_t what) if (what & PURGE_TABLES) { while ((t = TAILQ_FIRST(env->sc_tables)) != NULL) { TAILQ_REMOVE(env->sc_tables, t, t_entry); - while ((me = TAILQ_FIRST(&t->t_contents))) { - TAILQ_REMOVE(&t->t_contents, me, me_entry); - free(me); - } + + p = NULL; + while (dict_poproot(&t->t_dict, NULL, (void **)&p)) + free(p); free(t); } free(env->sc_tables); |