diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2006-05-27 20:07:43 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2006-05-27 20:07:43 +0000 |
commit | 4561afd395a1b76869b1bf315dc97e58508d8f61 (patch) | |
tree | 34a3789ca35953e87e2cccd599cd091f5e271733 | |
parent | a86bb489d0e511fe3fc0c7ab7c53e92600a95477 (diff) |
sync to bgpd: use ibuf->pid in imsg_create if pid == 0, claudio ok
-rw-r--r-- | usr.sbin/ospfd/imsg.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ospfd/imsg.c b/usr.sbin/ospfd/imsg.c index 8fded0d56a9..bfb4d886242 100644 --- a/usr.sbin/ospfd/imsg.c +++ b/usr.sbin/ospfd/imsg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imsg.c,v 1.6 2006/02/10 18:30:47 claudio Exp $ */ +/* $OpenBSD: imsg.c,v 1.7 2006/05/27 20:07:42 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -132,7 +132,8 @@ imsg_create(struct imsgbuf *ibuf, enum imsg_type type, u_int32_t peerid, hdr.len = (u_int16_t)(datalen + IMSG_HEADER_SIZE); hdr.type = type; hdr.peerid = peerid; - hdr.pid = pid; + if ((hdr.pid = pid) == 0) + hdr.pid = ibuf->pid; if ((wbuf = buf_open(hdr.len)) == NULL) { log_warn("imsg_create: buf_open"); return (NULL); |