MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ng_uncallout

Function ng_uncallout

freebsd/netgraph/ng_base.c:3812–3840  ·  view source on GitHub ↗

A special modified version of callout_stop() */

Source from the content-addressed store, hash-verified

3810
3811/* A special modified version of callout_stop() */
3812int
3813ng_uncallout(struct callout *c, node_p node)
3814{
3815 item_p item;
3816 int rval;
3817
3818 KASSERT(c != NULL, ("ng_uncallout: NULL callout"));
3819 KASSERT(node != NULL, ("ng_uncallout: NULL node"));
3820
3821 rval = callout_stop(c);
3822 item = c->c_arg;
3823 /* Do an extra check */
3824 if ((rval > 0) && (c->c_func == &ng_callout_trampoline) &&
3825 (item != NULL) && (NGI_NODE(item) == node)) {
3826 /*
3827 * We successfully removed it from the queue before it ran
3828 * So now we need to unreference everything that was
3829 * given extra references. (NG_FREE_ITEM does this).
3830 */
3831 NG_FREE_ITEM(item);
3832 }
3833 c->c_arg = NULL;
3834
3835 /*
3836 * Callers only want to know if the callout was cancelled and
3837 * not draining or stopped.
3838 */
3839 return (rval > 0);
3840}
3841
3842/*
3843 * Set the address, if none given, give the node here.

Callers 15

ngp_shutdownFunction · 0.70
ng_pppoe_rcvdataFunction · 0.70
ng_pppoe_rcvdata_etherFunction · 0.70
ng_pppoe_disconnectFunction · 0.70
ng_bridge_shutdownFunction · 0.70
cisco_disconnectFunction · 0.70
ng_pptpgre_xmitFunction · 0.70
ng_pptpgre_rcvdata_lowerFunction · 0.70
ng_pptpgre_resetFunction · 0.70
ng_car_shutdownFunction · 0.70
ng_l2tp_shutdownFunction · 0.70
ng_l2tp_seq_resetFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected