From ff86256bf7f74eac72c4bd8a23d667579c672873 Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 8 Jan 2001 05:34:06 +0000 Subject: Part 2 of the netgraph rewrite. This is mostly cosmetic changes, (though I caught a bug or two while makeing them) Reviewed by: archie@freebsd.org --- sys/netgraph/ng_echo.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sys/netgraph/ng_echo.c') diff --git a/sys/netgraph/ng_echo.c b/sys/netgraph/ng_echo.c index 337df72..68a165d 100644 --- a/sys/netgraph/ng_echo.c +++ b/sys/netgraph/ng_echo.c @@ -47,6 +47,7 @@ */ #include +#include #include #include #include @@ -106,7 +107,7 @@ nge_rcvdata(hook_p hook, item_p item) { int error = 0; - NG_FWD_DATA(error, item, hook); + NG_FWD_ITEM_HOOK(error, item, hook); return (0); } @@ -116,9 +117,9 @@ nge_rcvdata(hook_p hook, item_p item) static int nge_disconnect(hook_p hook) { - if ((hook->node->numhooks == 0) - && ((hook->node->flags & NG_INVALID) == 0)) { - ng_rmnode_self(hook->node); + if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0) + && (NG_NODE_IS_VALID(NG_HOOK_NODE(hook)))) { + ng_rmnode_self(NG_HOOK_NODE(hook)); } return (0); } -- cgit v1.1