OSDN Git Service

Cleanup L2CAP socket properly on close
authorSrinu Jella <sjella@codeaurora.org>
Mon, 21 Sep 2015 06:30:48 +0000 (12:00 +0530)
committerAndre Eisenbach <eisenbach@google.com>
Fri, 25 Mar 2016 20:11:25 +0000 (13:11 -0700)
commit9b4de840e65ce051f9585c12071f4bcf5fa26ea3
tree0b7d0fedcd78f938e40d21099c87748fefa6722c
parent71b1a5d84577e5ffe51cbd99b442473465667fdf
Cleanup L2CAP socket properly on close

Use case:
1. Sometimes pairing pop up occurs during Android beam
   transfer though it is not required.
2. No OPP Tx request over OBEX if we cancel during file transfer.

Precondition
1. WIFI ON and conneted with AP.

Steps:
1. Pair and connect from DUT to remote.
2. Go to gallery and send a file.
3. Accept same file and stop it from remote during transfer.
4. Repeat step 2-4 10 times.

Failure:
OPP Tx should not fail.

Root cause:
Close request was not properly handled from BT-IF layer.

Fix:
1. Handled the close request properly from BT-IF layer
   to close the socket variables and instruct the BTA layer
   close from there as well.
2. Clean up L2CAP socket properly on closure to free
   the entry registered with security manager to avoid
   leak in security manager records.

Bug: 27852645
Change-Id: I4f5d6ac92317bcaee5f9285ba71d13eea84c737c
bta/jv/bta_jv_act.c
btif/src/btif_sock_l2cap.c