Skip to content

Commit

Permalink
Bluetooth: Fix checking the wrong flag when accepting a socket
Browse files Browse the repository at this point in the history
Most probably a typo, the check should have been for BT_SK_DEFER_SETUP
instead of BT_DEFER_SETUP (which right now only represents a socket
option).

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Acked-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
  • Loading branch information
Vinicius Costa Gomes authored and Johan Hedberg committed Jun 5, 2012
1 parent fcb6ff5 commit ddcd0f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bluetooth/af_bluetooth.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock)
}

if (sk->sk_state == BT_CONNECTED || !newsock ||
test_bit(BT_DEFER_SETUP, &bt_sk(parent)->flags)) {
test_bit(BT_SK_DEFER_SETUP, &bt_sk(parent)->flags)) {
bt_accept_unlink(sk);
if (newsock)
sock_graft(sk, newsock);
Expand Down

0 comments on commit ddcd0f4

Please sign in to comment.