Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361466
b: refs/heads/master
c: e6a3a4b
h: refs/heads/master
v: v3
  • Loading branch information
Samuel Ortiz committed Mar 8, 2013
1 parent 337977b commit a6e52ae
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3536da06db0baa675f32de608c0a4c0f5ef0e9ff
refs/heads/master: e6a3a4bb856a6fba551b43376c80f45836132710
29 changes: 29 additions & 0 deletions trunk/net/nfc/llcp/llcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,35 @@ static void nfc_llcp_socket_release(struct nfc_llcp_local *local, bool listen)
}

write_unlock(&local->sockets.lock);

/*
* If we want to keep the listening sockets alive,
* we don't touch the RAW ones.
*/
if (listen == true)
return;

write_lock(&local->raw_sockets.lock);

sk_for_each_safe(sk, tmp, &local->raw_sockets.head) {
llcp_sock = nfc_llcp_sock(sk);

bh_lock_sock(sk);

nfc_llcp_socket_purge(llcp_sock);

sk->sk_state = LLCP_CLOSED;

sk->sk_state_change(sk);

bh_unlock_sock(sk);

sock_orphan(sk);

sk_del_node_init(sk);
}

write_unlock(&local->raw_sockets.lock);
}

struct nfc_llcp_local *nfc_llcp_local_get(struct nfc_llcp_local *local)
Expand Down

0 comments on commit a6e52ae

Please sign in to comment.