Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 20250
b: refs/heads/master
c: 7b005bd
h: refs/heads/master
v: v3
  • Loading branch information
Marcel Holtmann committed Feb 13, 2006
1 parent 50f5405 commit 8ed1baf
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 56f3a40a5e7586043260669cc794e56fa58339e1
refs/heads/master: 7b005bd34c895ebeefd1c62f90a329730b88946b
10 changes: 8 additions & 2 deletions trunk/net/bluetooth/hci_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,15 @@ void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb)
static int hci_sock_release(struct socket *sock)
{
struct sock *sk = sock->sk;
struct hci_dev *hdev = hci_pi(sk)->hdev;
struct hci_dev *hdev;

BT_DBG("sock %p sk %p", sock, sk);

if (!sk)
return 0;

hdev = hci_pi(sk)->hdev;

bt_sock_unlink(&hci_sk_list, sk);

if (hdev) {
Expand Down Expand Up @@ -311,14 +313,18 @@ static int hci_sock_getname(struct socket *sock, struct sockaddr *addr, int *add
{
struct sockaddr_hci *haddr = (struct sockaddr_hci *) addr;
struct sock *sk = sock->sk;
struct hci_dev *hdev = hci_pi(sk)->hdev;

BT_DBG("sock %p sk %p", sock, sk);

if (!hdev)
return -EBADFD;

lock_sock(sk);

*addr_len = sizeof(*haddr);
haddr->hci_family = AF_BLUETOOTH;
haddr->hci_dev = hci_pi(sk)->hdev->id;
haddr->hci_dev = hdev->id;

release_sock(sk);
return 0;
Expand Down

0 comments on commit 8ed1baf

Please sign in to comment.