diff options
author | hsu <hsu@FreeBSD.org> | 2002-06-14 08:35:21 +0000 |
---|---|---|
committer | hsu <hsu@FreeBSD.org> | 2002-06-14 08:35:21 +0000 |
commit | abda76de0b81d58e1eb0e275c4e384fe97cca491 (patch) | |
tree | 4544f6f0f46695f374bc2a22ee6af0eecc9a671f /sys/netinet/in_pcb.c | |
parent | 0c8a9db6f99a60d7dd69784a1c0e0f6d254fdcc3 (diff) | |
download | FreeBSD-src-abda76de0b81d58e1eb0e275c4e384fe97cca491.zip FreeBSD-src-abda76de0b81d58e1eb0e275c4e384fe97cca491.tar.gz |
Notify functions can destroy the pcb, so they have to return an
indication of whether this happenned so the calling function
knows whether or not to unlock the pcb.
Submitted by: Jennifer Yang (yangjihui@yahoo.com)
Bug reported by: Sid Carter (sidcarter@symonds.net)
Diffstat (limited to 'sys/netinet/in_pcb.c')
-rw-r--r-- | sys/netinet/in_pcb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 2c539b3..744cfc2 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -669,7 +669,7 @@ in_pcbnotifyall(pcbinfo, faddr, errno, notify) struct inpcbinfo *pcbinfo; struct in_addr faddr; int errno; - void (*notify)(struct inpcb *, int); + struct inpcb *(*notify)(struct inpcb *, int); { struct inpcb *inp, *ninp; struct inpcbhead *head; @@ -777,7 +777,7 @@ in_losing(inp) * After a routing change, flush old routing * and allocate a (hopefully) better one. */ -void +struct inpcb * in_rtchange(inp, errno) register struct inpcb *inp; int errno; @@ -790,6 +790,7 @@ in_rtchange(inp, errno) * output is attempted. */ } + return inp; } /* |