Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 134715
b: refs/heads/master
c: 71aeeaa
h: refs/heads/master
i:
  134713: abb80db
  134711: 150fb32
v: v3
  • Loading branch information
Marcel Holtmann committed Feb 27, 2009
1 parent f6232a5 commit bb79b38
Show file tree
Hide file tree
Showing 2 changed files with 23 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: f66dc81f44d918ee1aa1a9d821bb2f25c7592bc0
refs/heads/master: 71aeeaa1fd88fe7446391e0553336f0e0c2cfe6a
24 changes: 22 additions & 2 deletions trunk/net/bluetooth/sco.c
Original file line number Diff line number Diff line change
Expand Up @@ -857,10 +857,30 @@ static void sco_conn_ready(struct sco_conn *conn)
/* ----- SCO interface with lower layer (HCI) ----- */
static int sco_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 type)
{
register struct sock *sk;
struct hlist_node *node;
int lm = 0;

if (type != SCO_LINK && type != ESCO_LINK)
return 0;

BT_DBG("hdev %s, bdaddr %s", hdev->name, batostr(bdaddr));

/* Always accept connection */
return HCI_LM_ACCEPT;
/* Find listening sockets */
read_lock(&sco_sk_list.lock);
sk_for_each(sk, node, &sco_sk_list.head) {
if (sk->sk_state != BT_LISTEN)
continue;

if (!bacmp(&bt_sk(sk)->src, &hdev->bdaddr) ||
!bacmp(&bt_sk(sk)->src, BDADDR_ANY)) {
lm |= HCI_LM_ACCEPT;
break;
}
}
read_unlock(&sco_sk_list.lock);

return lm;
}

static int sco_connect_cfm(struct hci_conn *hcon, __u8 status)
Expand Down

0 comments on commit bb79b38

Please sign in to comment.