Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352347
b: refs/heads/master
c: 4052808
h: refs/heads/master
i:
  352345: 5b1952a
  352343: 79dcf99
v: v3
  • Loading branch information
Andre Guedes authored and Gustavo Padovan committed Feb 1, 2013
1 parent 3c67870 commit d009044
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 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: 3810285cf8cef5c3f9c4334a317b71b876125269
refs/heads/master: 405280887f8fb4e168a1bbc865917bb2b881db95
18 changes: 10 additions & 8 deletions trunk/net/bluetooth/sco.c
Original file line number Diff line number Diff line change
Expand Up @@ -900,26 +900,29 @@ static void sco_conn_ready(struct sco_conn *conn)

BT_DBG("conn %p", conn);

sco_conn_lock(conn);

if (sk) {
sco_sock_clear_timer(sk);
bh_lock_sock(sk);
sk->sk_state = BT_CONNECTED;
sk->sk_state_change(sk);
bh_unlock_sock(sk);
} else {
sco_conn_lock(conn);

parent = sco_get_sock_listen(conn->src);
if (!parent)
goto done;
if (!parent) {
sco_conn_unlock(conn);
return;
}

bh_lock_sock(parent);

sk = sco_sock_alloc(sock_net(parent), NULL,
BTPROTO_SCO, GFP_ATOMIC);
if (!sk) {
bh_unlock_sock(parent);
goto done;
sco_conn_unlock(conn);
return;
}

sco_sock_init(sk, parent);
Expand All @@ -939,10 +942,9 @@ static void sco_conn_ready(struct sco_conn *conn)
parent->sk_data_ready(parent, 1);

bh_unlock_sock(parent);
}

done:
sco_conn_unlock(conn);
sco_conn_unlock(conn);
}
}

/* ----- SCO interface with lower layer (HCI) ----- */
Expand Down

0 comments on commit d009044

Please sign in to comment.