diff options
author | takawata <takawata@FreeBSD.org> | 2016-06-07 16:57:13 +0000 |
---|---|---|
committer | takawata <takawata@FreeBSD.org> | 2016-06-07 16:57:13 +0000 |
commit | 038b418853e12c94201747ac6e5d1585466dd2eb (patch) | |
tree | 2088da79d9a30225f11083ba8477efdcc2ff35c0 /sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c | |
parent | d43bd6c61946d0f9a305260f947a486c8ee2a18e (diff) | |
download | FreeBSD-src-038b418853e12c94201747ac6e5d1585466dd2eb.zip FreeBSD-src-038b418853e12c94201747ac6e5d1585466dd2eb.tar.gz |
Disconnect LE socket when the HCI connection associated is disconnected.
Diffstat (limited to 'sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c')
-rw-r--r-- | sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c b/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c index 4b88bc8..2dc370f 100644 --- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c +++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c @@ -1389,7 +1389,13 @@ ng_l2cap_l2ca_discon_ind(ng_l2cap_chan_p ch) error = ENOMEM; else { ip = (ng_l2cap_l2ca_discon_ind_ip *)(msg->data); - ip->lcid = ch->scid; + ip->idtype = ch->idtype; + if(ch->idtype == NG_L2CAP_L2CA_IDTYPE_ATT|| + ch->idtype == NG_L2CAP_L2CA_IDTYPE_SMP) + ip->lcid = ch->con->con_handle; + else + ip->lcid = ch->scid; + NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, 0); } |