Revert previous commit.

glebius@ noticed that it was not a bug, but undocumented feature.
This commit is contained in:
Alexander Motin 2008-02-03 10:30:45 +00:00
parent 869a40898a
commit 102fe25ee0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=175934

View File

@ -190,9 +190,6 @@ ng_netflow_constructor(node_p node)
if ((error = ng_netflow_cache_init(priv)))
return (error);
/* Schedule expiry. */
callout_reset(&priv->exp_callout, (1*hz), &ng_netflow_expire,
(void *)priv);
return (0);
}
@ -278,6 +275,10 @@ ng_netflow_newhook(node_p node, hook_p hook, const char *name)
*/
NG_HOOK_FORCE_QUEUE(NG_HOOK_PEER(hook));
#endif
/* Exporter is ready. Let's schedule expiry. */
callout_reset(&priv->exp_callout, (1*hz), &ng_netflow_expire,
(void *)priv);
} else
return (EINVAL);
@ -649,8 +650,11 @@ ng_netflow_disconnect(hook_p hook)
iface->out = NULL;
}
if (hook == priv->export)
/* if export hook disconnected stop running expire(). */
if (hook == priv->export) {
callout_drain(&priv->exp_callout);
priv->export = NULL;
}
/* Removal of the last link destroys the node. */
if (NG_NODE_NUMHOOKS(node) == 0)