summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2005-10-18 15:42:16 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2005-10-18 15:42:16 +0000
commite8de219ae40671b415dcc7f0e13fe620c65c2af4 (patch)
tree7a9759ad65be51c7d5cec1572d3f3c2f8923074f
parent00b2bc17f76ef9941eb9183d0da44e00587e00b4 (diff)
Simplify code a bit. OK norby@
-rw-r--r--usr.sbin/ospfd/control.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/usr.sbin/ospfd/control.c b/usr.sbin/ospfd/control.c
index 3c7dab95fe0..319ada77571 100644
--- a/usr.sbin/ospfd/control.c
+++ b/usr.sbin/ospfd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.11 2005/05/12 19:10:12 norby Exp $ */
+/* $OpenBSD: control.c,v 1.12 2005/10/18 15:42:15 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -224,6 +224,7 @@ control_dispatch_imsg(int fd, short event, void *bula)
case IMSG_CTL_FIB_COUPLE:
case IMSG_CTL_FIB_DECOUPLE:
case IMSG_CTL_RELOAD:
+ c->ibuf.pid = imsg.hdr.pid;
ospfe_imsg_compose_parent(imsg.hdr.type, 0, NULL, 0);
break;
case IMSG_CTL_KROUTE:
@@ -250,6 +251,8 @@ control_dispatch_imsg(int fd, short event, void *bula)
case IMSG_CTL_SHOW_DB_SELF:
case IMSG_CTL_SHOW_DB_SUM:
case IMSG_CTL_SHOW_DB_ASBR:
+ case IMSG_CTL_SHOW_RIB:
+ case IMSG_CTL_SHOW_SUM:
c->ibuf.pid = imsg.hdr.pid;
ospfe_imsg_compose_rde(imsg.hdr.type, 0, imsg.hdr.pid,
imsg.data, imsg.hdr.len - IMSG_HEADER_SIZE);
@@ -257,12 +260,6 @@ control_dispatch_imsg(int fd, short event, void *bula)
case IMSG_CTL_SHOW_NBR:
ospfe_nbr_ctl(c);
break;
- case IMSG_CTL_SHOW_RIB:
- case IMSG_CTL_SHOW_SUM:
- c->ibuf.pid = imsg.hdr.pid;
- ospfe_imsg_compose_rde(imsg.hdr.type, 0, imsg.hdr.pid,
- imsg.data, imsg.hdr.len - IMSG_HEADER_SIZE);
- break;
default:
log_debug("control_dispatch_imsg: "
"error handling imsg %d", imsg.hdr.type);