summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c b/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c
index 2e0efe3..60bfd45 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c
@@ -90,7 +90,17 @@ ng_l2cap_con_wakeup(ng_l2cap_con_p con)
case NG_L2CAP_DISCON_RSP:
case NG_L2CAP_ECHO_RSP:
case NG_L2CAP_INFO_RSP:
- ng_l2cap_lp_send(con, NG_L2CAP_SIGNAL_CID, m);
+ /*
+ * Do not check return ng_l2cap_lp_send() value, because
+ * in these cases we do not really have a graceful way out.
+ * ECHO and INFO responses are internal to the stack and not
+ * visible to user. REJect is just being nice to remote end
+ * (otherwise remote end will timeout anyway). DISCON is
+ * probably most interesting here, however, if it fails
+ * there is nothing we can do anyway.
+ */
+
+ (void) ng_l2cap_lp_send(con, NG_L2CAP_SIGNAL_CID, m);
ng_l2cap_unlink_cmd(cmd);
ng_l2cap_free_cmd(cmd);
break;
OpenPOWER on IntegriCloud