diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2015-12-02 13:41:28 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2015-12-02 13:41:28 +0000 |
commit | 1bbf9c2e20b7a7b9910c65fff876c2933e534bb0 (patch) | |
tree | eb649f69187d457995caaa32a534e66af93fd698 /usr.sbin/relayd/hce.c | |
parent | 4708af35e9d431c1d0ecc7ca6d810d08f4b979b7 (diff) |
In most cases we don't need all arguments of proc_compose*_imsg(),
so add a shortcut proc_compose*() that skips all of them. Only use the
full argument list if needed. The functions with full argument lists can
eventually be replaced with a nicer transaction-based approach later.
OK benno@
Diffstat (limited to 'usr.sbin/relayd/hce.c')
-rw-r--r-- | usr.sbin/relayd/hce.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/relayd/hce.c b/usr.sbin/relayd/hce.c index 0c520a27577..78832dfadd5 100644 --- a/usr.sbin/relayd/hce.c +++ b/usr.sbin/relayd/hce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hce.c,v 1.70 2015/11/28 18:10:12 benno Exp $ */ +/* $OpenBSD: hce.c,v 1.71 2015/12/02 13:41:27 reyk Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -133,7 +133,7 @@ hce_launch_checks(int fd, short event, void *arg) /* * notify pfe checks are done and schedule next check */ - proc_compose_imsg(env->sc_ps, PROC_PFE, -1, IMSG_SYNC, -1, NULL, 0); + proc_compose(env->sc_ps, PROC_PFE, IMSG_SYNC, NULL, 0); TAILQ_FOREACH(table, env->sc_tables, entry) { TAILQ_FOREACH(host, &table->hosts, entry) { if ((host->flags & F_CHECK_DONE) == 0) @@ -243,8 +243,7 @@ hce_notify_done(struct host *host, enum host_error he) if (msg) log_debug("%s: %s (%s)", __func__, host->conf.name, msg); - proc_compose_imsg(env->sc_ps, PROC_PFE, -1, IMSG_HOST_STATUS, - -1, &st, sizeof(st)); + proc_compose(env->sc_ps, PROC_PFE, IMSG_HOST_STATUS, &st, sizeof(st)); if (host->up != host->last_up) logopt = RELAYD_OPT_LOGUPDATE; else |