|
From: Gordon M. <gm...@us...> - 2001-04-17 05:33:19
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
bluetooth.c 1.161 1.162=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
--Someone correct me if I'm wrong, but I don't think we can get a useful SD=
P connection without this change. The only time we'll ever see BT_INACTIVE =
on a session after starting a BTCONNECT is if the line is /dev/ttyBTC. But =
if we establish an SDP connection on /dev/ttyBTC we'll never be able to use=
it for BT_SDP_REQUEST ioctls because it's session state will be stuck in B=
T_LOWERCONNECTED. The BT_ACTIVE state is impossible on /dev/ttyBTC. So we'l=
l need to use one of the data devices, and as soon as one of these opens th=
e session state goes to BT_UPPERCONNECTED.
The diff of the modified file(s):
--- bluetooth.c 2001/04/12 12:06:53 1.161
+++ bluetooth.c 2001/04/17 05:33:19 1.162
@@ -2412,7 +2412,8 @@
D_WARN("bt_register_sdp: Pending SDP data for this new connection @ line=
%d\n", line);
}
=20
- if (SESSIONSTATE(line) =3D=3D BT_INACTIVE) {
+ if ((SESSIONSTATE(line) =3D=3D BT_INACTIVE) ||
+ (SESSIONSTATE(line) =3D=3D BT_UPPERCONNECTED)){
/* now register ! */
DSYS("bt_register_sdp : line %d\n", line);
SESSIONSTATE(line) =3D BT_ACTIVE;
@@ -2503,7 +2504,7 @@
/* Data line ! */
if (!bt_stack_initiated) {
D_WARN("bt_register_tty : Bluetooth stack not initiated\n");
- return -1;
+ return -EPERM;
}
}
=20
|