diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2012-06-20 20:45:24 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2012-06-20 20:45:24 +0000 |
commit | 625d021c319435ff6dc43ba6da49cc6f843660e6 (patch) | |
tree | daccc7eee275d74c1c33a848937b2082f1da4911 /usr.sbin/smtpd/smtpctl.c | |
parent | b3754338b7b2d4d28b37a5d6f67daa8b002abcda (diff) |
Finally get rid of the queue_kind enum in the queue API. Keep that
internally in fsqueue backend for now, and let the fsqueue_message()
and fsqueue_envelope() dispatchers do the right thing.
Based on a diff by chl@
ok chl@ gilles@
Diffstat (limited to 'usr.sbin/smtpd/smtpctl.c')
-rw-r--r-- | usr.sbin/smtpd/smtpctl.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/smtpd/smtpctl.c b/usr.sbin/smtpd/smtpctl.c index de9d0653a5e..0926c5f7143 100644 --- a/usr.sbin/smtpd/smtpctl.c +++ b/usr.sbin/smtpd/smtpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpctl.c,v 1.80 2012/05/13 09:18:52 nicm Exp $ */ +/* $OpenBSD: smtpctl.c,v 1.81 2012/06/20 20:45:23 eric Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -46,7 +46,7 @@ void usage(void); static void setup_env(struct smtpd *); static int show_command_output(struct imsg *); static int show_stats_output(struct imsg *); -static void show_queue(enum queue_kind, int); +static void show_queue(int); static void show_envelope(struct envelope *, int); static void getflag(u_int *, int, char *, char *, size_t); @@ -106,7 +106,7 @@ main(int argc, char *argv[]) if (geteuid()) errx(1, "need root privileges"); setup_env(&smtpd); - show_queue(Q_QUEUE, 0); + show_queue(0); return 0; } else if (strcmp(__progname, "smtpctl") == 0) { @@ -122,7 +122,7 @@ main(int argc, char *argv[]) /* handle "disconnected" commands */ switch (res->action) { case SHOW_QUEUE: - show_queue(Q_QUEUE, 0); + show_queue(0); break; case SHOW_RUNQUEUE: break; @@ -437,7 +437,7 @@ show_stats_output(struct imsg *imsg) } static void -show_queue(enum queue_kind kind, int flags) +show_queue(int flags) { struct qwalk *q; struct envelope envelope; @@ -448,10 +448,10 @@ show_queue(enum queue_kind kind, int flags) if (chroot(PATH_SPOOL) == -1 || chdir(".") == -1) err(1, "%s", PATH_SPOOL); - q = qwalk_new(kind, 0); + q = qwalk_new(0); while (qwalk(q, &evpid)) { - if (! queue_envelope_load(kind, evpid, &envelope)) + if (! queue_envelope_load(evpid, &envelope)) continue; show_envelope(&envelope, flags); } |