OSDN Git Service

Increase RFC_MCB_RELEASE_INACT_TIMER to 20 seconds
authorHansong Zhang <hsz@google.com>
Tue, 12 Jan 2021 07:22:33 +0000 (23:22 -0800)
committerHansong Zhang <hsz@google.com>
Tue, 12 Jan 2021 07:26:01 +0000 (07:26 +0000)
Say we first connect to a remote device using RFCOMM.  The remote
decides to bond with us before we establish a channel.  This could take
longer than 2 seconds.

In the past we handle this before we create L2cap channel.  However,
re-bond can happen during RFCOMM session, because security requirement
might have changed.

Test: cert/run
Tag: #gd-refactor
Bug: 141555841
Change-Id: I7d5618b37d5414b10abe7497c3ea6819fb802db7

stack/rfcomm/rfc_int.h

index 313f7cf..28583e6 100644 (file)
@@ -258,7 +258,7 @@ extern std::unordered_map<uint32_t /* scn */, uint16_t /* sec_mask */>
 #define RFC_MCB_INIT_INACT_TIMER 60 /* in seconds */
 
 /* Timer running on the multiplexor channel after last DLCI is released */
-#define RFC_MCB_RELEASE_INACT_TIMER 2 /* in seconds */
+#define RFC_MCB_RELEASE_INACT_TIMER 20 /* in seconds */
 
 #ifdef RFCOMM_PRECALC_FCS