OSDN Git Service

L2cap: Auto send ConnectRsp
authorHansong Zhang <hsz@google.com>
Sun, 27 Sep 2020 23:49:17 +0000 (16:49 -0700)
committerHansong Zhang <hsz@google.com>
Mon, 28 Sep 2020 18:55:20 +0000 (11:55 -0700)
commitd8d7224c2e1451b0dba85a64007366149253ce00
tree01aea61892602e7bff19de40e3771adffb208943
parentd77658a680d65feec984c4f24dea28028e1a4853
L2cap: Auto send ConnectRsp

In the past, L2cap user can decide whether to accept or reject a
ConnectReq. If reject, the channel is closed.

Now let L2cap layer always auto accept the remote ConnectReq and start
config process. If the L2cap user wants to reject, they can send a
DisconnectReq. According to L2cap state machine, a DisconnectReq after
ConnectRsp terminates the channel, which is equivalent to sending a
negative ConnectRsp, as before.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ibed56206148922356e8d9cb10650e9d82ab61225
12 files changed:
stack/avct/avct_l2c.cc
stack/avct/avct_l2c_br.cc
stack/avdt/avdt_l2c.cc
stack/bnep/bnep_main.cc
stack/gap/gap_conn.cc
stack/gatt/gatt_main.cc
stack/hid/hidd_conn.cc
stack/hid/hidh_conn.cc
stack/l2cap/l2c_csm.cc
stack/rfcomm/rfc_l2cap_if.cc
stack/rfcomm/rfc_mx_fsm.cc
stack/sdp/sdp_main.cc