|
From: Anders J. <and...@us...> - 2002-02-19 19:04:42
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
l2cap.c 1.129 1.130=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Disconnect after a succesful echorequest if we initiated the connection.
The diff of the modified file(s):
--- l2cap.c 11 Feb 2002 17:52:38 -0000 1.129
+++ l2cap.c 19 Feb 2002 19:04:41 -0000 1.130
@@ -2846,6 +2846,7 @@
l2cap_con *con;
s32 i, retval =3D 0;
u8 rev_bd[6];
+ int first_conn =3D 0;
=20
D_XMIT("Sending ping\n");
print_data("Ping destination: bd ", bd, 6);
@@ -2859,6 +2860,8 @@
=20
if (con =3D=3D NULL) {
D_STATE(__FUNCTION__ ": create new baseband link\n");
+ first_conn =3D 1;
+=09=09
con =3D create_con(0/* not yet set */,=20
get_cid(), 0/* not yet set */);
if (con =3D=3D NULL) {
@@ -2915,6 +2918,10 @@
if (con->c_status =3D=3D CSTATUS_MAX_NO_RTX) {
/* max number reached, try to disconnect */
retval =3D l2cap_disconnect_req(con);
+ }
+
+ if(first_conn) {
+ lp_disconnect(con->hci_hdl);
}
=20
return retval;
|