diff options
author | Pierre-Yves Ritschard <pyr@cvs.openbsd.org> | 2007-05-29 23:19:19 +0000 |
---|---|---|
committer | Pierre-Yves Ritschard <pyr@cvs.openbsd.org> | 2007-05-29 23:19:19 +0000 |
commit | 6f0aa2bc0d2309a080e85b5470f4e466b941a8dc (patch) | |
tree | ea78ae79dde6e051ea7177a135474a13139ec134 /usr.sbin/relayd/relayd.c | |
parent | 3657b9f8de0def746e0c4241bee2fe4cc6f1e885 (diff) |
allow the control handling code to send messages back to the parent.
forward IMSG_CTL_RELOAD which ends up not doing anything for now.
Diffstat (limited to 'usr.sbin/relayd/relayd.c')
-rw-r--r-- | usr.sbin/relayd/relayd.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/usr.sbin/relayd/relayd.c b/usr.sbin/relayd/relayd.c index f7ac75092d8..10810254e13 100644 --- a/usr.sbin/relayd/relayd.c +++ b/usr.sbin/relayd/relayd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relayd.c,v 1.28 2007/05/29 18:59:53 pyr Exp $ */ +/* $OpenBSD: relayd.c,v 1.29 2007/05/29 23:19:18 pyr Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org> @@ -241,10 +241,11 @@ main(int argc, char *argv[]) (ibuf_hce = calloc(1, sizeof(struct imsgbuf))) == NULL) fatal(NULL); - if (env->prefork_relay > 0 && - (ibuf_relay = calloc(env->prefork_relay, - sizeof(struct imsgbuf)) == NULL)) - fatal(NULL); + if (env->prefork_relay > 0) { + if ((ibuf_relay = calloc(env->prefork_relay, + sizeof(struct imsgbuf))) == NULL) + fatal(NULL); + } imsg_init(ibuf_pfe, pipe_parent2pfe[0], main_dispatch_pfe); imsg_init(ibuf_hce, pipe_parent2hce[0], main_dispatch_hce); @@ -474,6 +475,11 @@ main_dispatch_pfe(int fd, short event, void *ptr) memcpy(&demote, imsg.data, sizeof(demote)); carp_demote_set(demote.group, demote.level); break; + case IMSG_CTL_RELOAD: + /* + * so far we only get here if no L7 (relay) is done. + */ + break; default: log_debug("main_dispatch_pfe: unexpected imsg %d", imsg.hdr.type); |