|
From: Peter K. <pk...@us...> - 2001-09-12 11:45:03
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
l2cap.c 1.115 1.116=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Minor clean-up.
The diff of the modified file(s):
--- l2cap.c 2001/09/11 10:32:28 1.115
+++ l2cap.c 2001/09/12 11:45:02 1.116
@@ -293,9 +293,8 @@
hci_read_local_bd(l2cap->my_bd);
=20
/* check result... */
- if ((l2cap->my_bd[0] =3D=3D 0) && (l2cap->my_bd[1] =3D=3D 0) &&=20
- (l2cap->my_bd[2] =3D=3D 0) && (l2cap->my_bd[3] =3D=3D 0) &&
- (l2cap->my_bd[4] =3D=3D 0) && (l2cap->my_bd[5] =3D=3D 0))
+ if (!l2cap->my_bd[0] && !l2cap->my_bd[1] && !l2cap->my_bd[2] &&
+ !l2cap->my_bd[3] && !l2cap->my_bd[4] && !l2cap->my_bd[5])
D_ERR(__FUNCTION__ ": Failed to get local BD addr\n");
else {
i =3D l2cap_sprint_bd(bd_name, l2cap->my_bd);
@@ -1308,8 +1307,8 @@
PRINTPKT(__FUNCTION__ ": from: ", bd_addr, 6);
=20
/* Check BD_ADDR */
- if ((bd_addr[0]=3D=3D0) && (bd_addr[1]=3D=3D0) && (bd_addr[2]=3D=
=3D0) &&
- (bd_addr[3]=3D=3D0) && (bd_addr[4]=3D=3D0) && (bd_addr[5]=3D=
=3D0)) {
+ if (!bd_addr[0] && !bd_addr[1] && !bd_addr[2] &&
+ !bd_addr[3] && !bd_addr[4] && !bd_addr[5]) {
D_ERR(__FUNCTION__ ": no BD addr\n");
return;
}
@@ -1325,10 +1324,8 @@
D_CON(__FUNCTION__ ": Accepting connection\n");
l2cap_create_con(bd_addr);
lp_connect_rsp(bd_addr,1);
- }
- else{
- D_CON(__FUNCTION__ ": Denying connection. Current connections: %d,=20
- max connections: %d\n", hci_ctrl.nbr_of_connections, bt_ma=
x_connections);
+ } else {
+ D_CON(__FUNCTION__ ": Denying connection. Current connections: %d, max c=
onnections: %d\n", hci_ctrl.nbr_of_connections, bt_max_connections);
lp_connect_rsp(bd_addr,0);
}
}
@@ -1447,7 +1444,6 @@
/* delete connection if non-initiator */
delete_con(con);
}=20
-=09=09
}
}
=20=20
@@ -1555,8 +1551,7 @@
PRINTPKT(__FUNCTION__ ": sent to bd ",bd, 6);
=20
/* Check bd_addr */
- if ((bd[0]=3D=3D0) && (bd[1]=3D=3D0) && (bd[2]=3D=3D0) && (bd[3]=3D=3D0) =
&&
- (bd[4]=3D=3D0) && (bd[5]=3D=3D0)) {
+ if (!bd[0] && !bd[1] && !bd[2] && !bd[3] && !bd[4] && !bd[5]) {
D_ERR(__FUNCTION__ ": No BD-addr\n");
return -EINVAL;
}
@@ -2895,7 +2890,6 @@
/* wait here until we received a lp_connect_cfm */
l2ca_wait(__FUNCTION__ ": wait baseband", con);
=20=09=09
-
if (con->c_status =3D=3D RES_SUCCESS) {
/* check status */
D_XMIT("Now we got baseband, send echo req !\n");
@@ -2914,6 +2908,7 @@
while (con->c_status =3D=3D CSTATUS_RTX_TIMEOUT) {
D_XMIT("Sending echo req...\n");
l2cap_echo_req(con, opt_data, len);=09
+
/* wait until we received a response or after timeout */
=20
D_XMIT("Waiting for response or timeout\n");
@@ -2955,7 +2950,6 @@
=20
memcpy(con->remote_bd, rev_bd, 6);
con->link_up =3D 0;
-
con->initiator =3D 1;
insert_con(con);
=20
|