diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2009-11-08 21:40:06 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2009-11-08 21:40:06 +0000 |
commit | 0dfe9b155ae3af80cc0cd39fb4c62e8dd6d2db28 (patch) | |
tree | 0a1a6b3248ea8a8426e96d81dc154e66ec6f23c3 /usr.sbin/smtpd/queue_shared.c | |
parent | 2783b9e7a388c4dd94479d27f871f1d3af90d142 (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/queue_shared.c')
-rw-r--r-- | usr.sbin/smtpd/queue_shared.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/usr.sbin/smtpd/queue_shared.c b/usr.sbin/smtpd/queue_shared.c index 1e9f90ac995..eecfa600f7a 100644 --- a/usr.sbin/smtpd/queue_shared.c +++ b/usr.sbin/smtpd/queue_shared.c @@ -1,4 +1,4 @@ -/* $OpenBSD: queue_shared.c,v 1.25 2009/09/15 16:50:06 jacekm Exp $ */ +/* $OpenBSD: queue_shared.c,v 1.26 2009/11/08 21:40:05 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -570,23 +570,6 @@ queue_load_envelope(struct message *messagep, char *evpid) return 1; } -u_int64_t -queue_generate_id(void) -{ - u_int64_t id; - struct timeval tp; - - if (gettimeofday(&tp, NULL) == -1) - fatal("queue_generate_id: time"); - - id = (u_int32_t)tp.tv_sec; - id <<= 32; - id |= (u_int32_t)tp.tv_usec; - usleep(1); - - return (id); -} - u_int16_t queue_hash(char *msgid) { |