mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 06:21:31 +00:00
NFC: Keep socket alive until the DISC PDU is actually sent
This patch keeps the socket alive and therefore does not remove it from the sockets list in the local until the DISC PDU has been actually sent. Otherwise we would reply with DM PDUs before sending the DISC one. Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
58e3dd1558
commit
17f7ae16ae
3 changed files with 15 additions and 0 deletions
|
@ -730,6 +730,13 @@ static void nfc_llcp_tx_work(struct work_struct *work)
|
|||
DUMP_PREFIX_OFFSET, 16, 1,
|
||||
skb->data, skb->len, true);
|
||||
|
||||
if (ptype == LLCP_PDU_DISC && sk != NULL &&
|
||||
sk->sk_state == LLCP_DISCONNECTING) {
|
||||
nfc_llcp_sock_unlink(&local->sockets, sk);
|
||||
sock_orphan(sk);
|
||||
sock_put(sk);
|
||||
}
|
||||
|
||||
if (ptype == LLCP_PDU_I)
|
||||
copy_skb = skb_copy(skb, GFP_ATOMIC);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue