-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bt][gatt] Clean up MTU exchange result handling
Instead of returning a tuple of (att::Result<>, mtu) from gatt::Client:: ExchangeMTU's MTUCallback, return an att::Result<mtu>. This represents the result of the procedure more accurately - if the MTU exchange fails, no MTU is negotiated. The one edge case is if the MTU exchange fails because the peer does not support the procedure. This procedure is optional per v5.3 Vol. 3 Part F Table 4.1, and in this case we should continue initialization with the understanding that the MTU is the default, minimum LE MTU. This is the only behavior change from the prior code, the rest of the change is effectively a refactor. Also, change some EXPECT_EQ->ASSERT_EQ in RemoteServiceManagerTests so that failed expectations do not cause invalid array accesses and process termination. Bug: 36375 Test: `fx test bt-host-gatt-tests`, refactored gatt/client_unittests.cc and added RemoteServiceManagerTest.InitializeMtuExchangeNotSupportedSucceeds Change-Id: Ife0cb82eb70066cd8fc3988ac936d97fad71b8fd Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/689574 Reviewed-by: Ben Lawson <benlawson@google.com> Commit-Queue: Lucas Jenkins <lucasjenkins@google.com> Fuchsia-Auto-Submit: Lucas Jenkins <lucasjenkins@google.com>
- Loading branch information
Lucas Jenkins
authored and
CQ Bot
committed
Jun 14, 2022
1 parent
56d5159
commit efd151c
Showing
6 changed files
with
107 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.