Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
c1a988bb
Commit
c1a988bb
authored
Nov 21, 2002
by
Maksim Krasnyanskiy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix L2CAP client/server PSM clash.
parent
e01408ad
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
include/net/bluetooth/l2cap.h
include/net/bluetooth/l2cap.h
+2
-0
net/bluetooth/l2cap.c
net/bluetooth/l2cap.c
+3
-3
No files found.
include/net/bluetooth/l2cap.h
View file @
c1a988bb
...
@@ -224,6 +224,8 @@ struct l2cap_pinfo {
...
@@ -224,6 +224,8 @@ struct l2cap_pinfo {
__u8
ident
;
__u8
ident
;
__u16
sport
;
struct
l2cap_conn
*
conn
;
struct
l2cap_conn
*
conn
;
struct
sock
*
next_c
;
struct
sock
*
next_c
;
struct
sock
*
prev_c
;
struct
sock
*
prev_c
;
...
...
net/bluetooth/l2cap.c
View file @
c1a988bb
...
@@ -191,8 +191,7 @@ static struct sock *__l2cap_get_sock_by_addr(u16 psm, bdaddr_t *src)
...
@@ -191,8 +191,7 @@ static struct sock *__l2cap_get_sock_by_addr(u16 psm, bdaddr_t *src)
{
{
struct
sock
*
sk
;
struct
sock
*
sk
;
for
(
sk
=
l2cap_sk_list
.
head
;
sk
;
sk
=
sk
->
next
)
{
for
(
sk
=
l2cap_sk_list
.
head
;
sk
;
sk
=
sk
->
next
)
{
if
(
l2cap_pi
(
sk
)
->
psm
==
psm
&&
if
(
l2cap_pi
(
sk
)
->
sport
==
psm
&&
!
bacmp
(
&
bt_sk
(
sk
)
->
src
,
src
))
!
bacmp
(
&
bt_sk
(
sk
)
->
src
,
src
))
break
;
break
;
}
}
return
sk
;
return
sk
;
...
@@ -417,6 +416,7 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_
...
@@ -417,6 +416,7 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_
/* Save source address */
/* Save source address */
bacpy
(
&
bt_sk
(
sk
)
->
src
,
&
la
->
l2_bdaddr
);
bacpy
(
&
bt_sk
(
sk
)
->
src
,
&
la
->
l2_bdaddr
);
l2cap_pi
(
sk
)
->
psm
=
la
->
l2_psm
;
l2cap_pi
(
sk
)
->
psm
=
la
->
l2_psm
;
l2cap_pi
(
sk
)
->
sport
=
la
->
l2_psm
;
sk
->
state
=
BT_BOUND
;
sk
->
state
=
BT_BOUND
;
}
}
write_unlock_bh
(
&
l2cap_sk_list
.
lock
);
write_unlock_bh
(
&
l2cap_sk_list
.
lock
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment