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
05fc1576
Commit
05fc1576
authored
Feb 04, 2011
by
Gustavo F. Padovan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bluetooth: move l2cap_sock_kill() to l2cap_sock.c
Signed-off-by:
Gustavo F. Padovan
<
padovan@profusion.mobi
>
parent
6ddc0485
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
16 deletions
+16
-16
net/bluetooth/l2cap_core.c
net/bluetooth/l2cap_core.c
+0
-16
net/bluetooth/l2cap_sock.c
net/bluetooth/l2cap_sock.c
+16
-0
No files found.
net/bluetooth/l2cap_core.c
View file @
05fc1576
...
...
@@ -753,22 +753,6 @@ static void l2cap_sock_cleanup_listen(struct sock *parent)
sock_set_flag
(
parent
,
SOCK_ZAPPED
);
}
/* Kill socket (only if zapped and orphan)
* Must be called on unlocked socket.
*/
void
l2cap_sock_kill
(
struct
sock
*
sk
)
{
if
(
!
sock_flag
(
sk
,
SOCK_ZAPPED
)
||
sk
->
sk_socket
)
return
;
BT_DBG
(
"sk %p state %d"
,
sk
,
sk
->
sk_state
);
/* Kill poor orphan */
bt_sock_unlink
(
&
l2cap_sk_list
,
sk
);
sock_set_flag
(
sk
,
SOCK_DEAD
);
sock_put
(
sk
);
}
void
__l2cap_sock_close
(
struct
sock
*
sk
,
int
reason
)
{
BT_DBG
(
"sk %p state %d socket %p"
,
sk
,
sk
->
sk_state
,
sk
->
sk_socket
);
...
...
net/bluetooth/l2cap_sock.c
View file @
05fc1576
...
...
@@ -838,6 +838,22 @@ static int l2cap_sock_recvmsg(struct kiocb *iocb, struct socket *sock, struct ms
return
bt_sock_recvmsg
(
iocb
,
sock
,
msg
,
len
,
flags
);
}
/* Kill socket (only if zapped and orphan)
* Must be called on unlocked socket.
*/
void
l2cap_sock_kill
(
struct
sock
*
sk
)
{
if
(
!
sock_flag
(
sk
,
SOCK_ZAPPED
)
||
sk
->
sk_socket
)
return
;
BT_DBG
(
"sk %p state %d"
,
sk
,
sk
->
sk_state
);
/* Kill poor orphan */
bt_sock_unlink
(
&
l2cap_sk_list
,
sk
);
sock_set_flag
(
sk
,
SOCK_DEAD
);
sock_put
(
sk
);
}
static
int
l2cap_sock_shutdown
(
struct
socket
*
sock
,
int
how
)
{
struct
sock
*
sk
=
sock
->
sk
;
...
...
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