Skip to content

Commit

Permalink
wid: l2cap: Don't clear data on WID 104
Browse files Browse the repository at this point in the history
PTS is not waiting with sending data until this WID returns. This
results in race as we may clear data that was sent in current run
prior to handling WID.
  • Loading branch information
sjanc committed Dec 4, 2023
1 parent e44d336 commit 42f3f6f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions autopts/wid/l2cap.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ def hdl_wid_102(_: WIDParams):

def hdl_wid_103(_: WIDParams):
stack = get_stack()
stack.l2cap.clear_data()
chan = stack.l2cap.chan_lookup_id(0)
time.sleep(10)
btp.l2cap_reconfigure(None, None, chan.our_mtu + 1,
Expand All @@ -354,8 +355,6 @@ def hdl_wid_103(_: WIDParams):


def hdl_wid_104(_: WIDParams):
stack = get_stack()
stack.l2cap.clear_data()
return True


Expand Down

0 comments on commit 42f3f6f

Please sign in to comment.