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

Function ng_l2cap_discon_timeout

freebsd/netgraph/bluetooth/l2cap/ng_l2cap_misc.c:207–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205 */
206
207int
208ng_l2cap_discon_timeout(ng_l2cap_con_p con)
209{
210 if (con->flags & (NG_L2CAP_CON_LP_TIMO|NG_L2CAP_CON_AUTO_DISCON_TIMO))
211 panic(
212"%s: %s - invalid timeout, state=%d, flags=%#x\n",
213 __func__, NG_NODE_NAME(con->l2cap->node),
214 con->state, con->flags);
215
216 con->flags |= NG_L2CAP_CON_AUTO_DISCON_TIMO;
217 ng_callout(&con->con_timo, con->l2cap->node, NULL,
218 con->l2cap->discon_timo * hz,
219 ng_l2cap_process_discon_timeout, NULL,
220 con->con_handle);
221
222 return (0);
223} /* ng_l2cap_discon_timeout */
224
225/*
226 * Unset auto disconnect timeout

Callers 1

ng_l2cap_con_unrefFunction · 0.85

Calls 2

panicFunction · 0.50
ng_calloutFunction · 0.50

Tested by

no test coverage detected