summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/smtpd.h
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2011-08-17 20:35:12 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2011-08-17 20:35:12 +0000
commitc21450136d12b5c4e59e0623028888cb5867da7f (patch)
treea8ce8ba2a44b0785867ba68986b666a01c5cb9bb /usr.sbin/smtpd/smtpd.h
parent8a539637b4a0a42f16457b693923bc5b556d09d1 (diff)
move ramqueue_host pointer from ramqueue_envelope to ramqueue_message.
this allows us to save one pointer from each envelope stored in ram while still allowing O(1) host lookups by ramqueue_envelope.
Diffstat (limited to 'usr.sbin/smtpd/smtpd.h')
-rw-r--r--usr.sbin/smtpd/smtpd.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h
index 3346af51df1..b0fc7d8bc6a 100644
--- a/usr.sbin/smtpd/smtpd.h
+++ b/usr.sbin/smtpd/smtpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.h,v 1.232 2011/08/17 20:04:43 gilles Exp $ */
+/* $OpenBSD: smtpd.h,v 1.233 2011/08/17 20:35:11 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -581,15 +581,15 @@ struct ramqueue_envelope {
TAILQ_ENTRY(ramqueue_envelope) queue_entry;
TAILQ_ENTRY(ramqueue_envelope) batchqueue_entry;
RB_ENTRY(ramqueue_envelope) evptree_entry;
- struct ramqueue_host *host;
- struct ramqueue_batch *batch;
- struct ramqueue_message *message;
+ struct ramqueue_batch *rq_batch;
+ struct ramqueue_message *rq_msg;
u_int64_t evpid;
time_t sched;
};
struct ramqueue_message {
RB_ENTRY(ramqueue_message) msgtree_entry;
RB_HEAD(evptree, ramqueue_envelope) evptree;
+ struct ramqueue_host *rq_host;
u_int32_t msgid;
};
struct ramqueue {
@@ -1116,7 +1116,7 @@ struct ramqueue_envelope *ramqueue_lookup_envelope(struct ramqueue *, u_int64_t)
void ramqueue_schedule(struct ramqueue *, u_int64_t);
void ramqueue_schedule_envelope(struct ramqueue *, struct ramqueue_envelope *);
-void ramqueue_remove_renvelope(struct ramqueue *, struct ramqueue_envelope *);
+void ramqueue_remove_envelope(struct ramqueue *, struct ramqueue_envelope *);
RB_PROTOTYPE(hosttree, ramqueue_host, hosttree_entry, ramqueue_host_cmp);
@@ -1127,6 +1127,9 @@ RB_PROTOTYPE(evptree, ramqueue_envelope, evp_entry, ramqueue_evp_cmp);
/* runner.c */
pid_t runner(void);
void message_reset_flags(struct envelope *);
+void runner_schedule(struct ramqueue *, u_int64_t);
+void runner_remove(struct ramqueue *, u_int64_t);
+void runner_remove_envelope(struct ramqueue *, struct ramqueue_envelope *);
/* smtp.c */