Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306890
b: refs/heads/master
c: 6b3af73
h: refs/heads/master
v: v3
  • Loading branch information
Marcel Holtmann authored and Gustavo Padovan committed May 9, 2012
1 parent fca4fa4 commit 5dbe1b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 35d4adcca1707c551f4598f68fe83118dd82cd60
refs/heads/master: 6b3af7334bd3c403647606adfb04f6e6bcf1597e
8 changes: 6 additions & 2 deletions trunk/net/bluetooth/l2cap_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,16 @@ static int l2cap_sock_listen(struct socket *sock, int backlog)

lock_sock(sk);

if ((sock->type != SOCK_SEQPACKET && sock->type != SOCK_STREAM)
|| sk->sk_state != BT_BOUND) {
if (sk->sk_state != BT_BOUND) {
err = -EBADFD;
goto done;
}

if (sk->sk_type != SOCK_SEQPACKET && sk->sk_type != SOCK_STREAM) {
err = -EINVAL;
goto done;
}

switch (chan->mode) {
case L2CAP_MODE_BASIC:
break;
Expand Down

0 comments on commit 5dbe1b9

Please sign in to comment.