summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/forward.c
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2009-11-08 21:40:06 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2009-11-08 21:40:06 +0000
commit0dfe9b155ae3af80cc0cd39fb4c62e8dd6d2db28 (patch)
tree0a1a6b3248ea8a8426e96d81dc154e66ec6f23c3 /usr.sbin/smtpd/forward.c
parent2783b9e7a388c4dd94479d27f871f1d3af90d142 (diff)
- make aliases expansion use a rb tree instead of a tail queue, the code
doesn't take advantage of the new structure yet, but this was a needed change for upcoming improvements. - introduce aliasestree_{lookup,insert,remove} to the aliases api - rename queue_generate_id() to generate_uid() and move it to utils.c as it is used all over the place and not only in queue tree idea discussed with jacekm@, if you update rebuild aliases db, make clean and flush queue
Diffstat (limited to 'usr.sbin/smtpd/forward.c')
-rw-r--r--usr.sbin/smtpd/forward.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/forward.c b/usr.sbin/smtpd/forward.c
index 94df78af645..f2d70a9f608 100644
--- a/usr.sbin/smtpd/forward.c
+++ b/usr.sbin/smtpd/forward.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: forward.c,v 1.15 2009/11/08 19:38:26 gilles Exp $ */
+/* $OpenBSD: forward.c,v 1.16 2009/11/08 21:40:05 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -35,7 +35,7 @@
#include "smtpd.h"
int
-forwards_get(int fd, struct aliaseslist *aliases)
+forwards_get(int fd, struct aliasestree *aliases)
{
FILE *fp;
struct alias alias;
@@ -99,7 +99,7 @@ forwards_get(int fd, struct aliaseslist *aliases)
if (aliasp == NULL)
fatal("calloc");
*aliasp = alias;
- TAILQ_INSERT_HEAD(aliases, aliasp, entry);
+ aliasestree_insert(aliases, aliasp);
nbaliases++;
} while (*cp != '\0');
}