From 4561afd395a1b76869b1bf315dc97e58508d8f61 Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Sat, 27 May 2006 20:07:43 +0000 Subject: sync to bgpd: use ibuf->pid in imsg_create if pid == 0, claudio ok --- usr.sbin/ospfd/imsg.c | 5 +++-- 1 file 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 @@ -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); -- cgit v1.2.3