|
From: Peter K. <pk...@us...> - 2001-11-30 13:08:10
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
l2cap.c 1.125 1.126=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Handle receiving a disconnection request while already waiting
for a disconnection response.
The diff of the modified file(s):
--- l2cap.c 2001/11/22 14:02:41 1.125
+++ l2cap.c 2001/11/30 13:08:07 1.126
@@ -832,8 +832,20 @@
con->sig_id_rcv =3D req->id;
=20
/* if already closed, simply acknowledge */
- if ((con->current_state =3D=3D CLOSED)) {
+ if (con->current_state =3D=3D CLOSED) {
D_STATE(__FUNCTION__ ": connection closed, send disc rsp\n");
+ l2cap_disconnect_rsp(con);
+ return;
+ }
+
+ /* Special case, if we send a disconnection request to the
+ other side and receive a disconnect indication while
+ waiting for the response, we can't send the upper layers
+ a disconnect indication as it may destroy the connection
+ object before we receive the response to our disconnection
+ request. */
+ if (con->current_state =3D=3D W4_L2CAP_DISCONNECT_RSP) {
+ D_STATE(__FUNCTION__ ": Waiting for an outstanding disconnect_req, send=
disconnect_rsp\n");
l2cap_disconnect_rsp(con);
return;
}
|