Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db247a7c authored by Martin Brabham's avatar Martin Brabham Committed by Myles Watson
Browse files

NameDB: Actually remove the address from requested addresses

When a ReadRemoteName is called, there is a single PendingRemoteNameRead
struct that is set.  This contains the callback and handler.  Once this
is set, you cannot set another.  The initial problem is that in the
OnRemoteReadResponse we never remove it from an internal tracking map.
This map prevents us from making duplicate requests which is good, but
since it's never removed, we can only request one time.

This CL fixes that by removing it in the OnRemoteReadResponse.

Additionally, from an API standpoint we want to provide a functioning
API.  If a caller requests a name read and provides a callback, then why
not just call their callback when we get the data instead of telling
them we can't meet their needs (which is untrue).

Bug: 162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Change-Id: I55e41905cde5146bcb06b39078a02aa9ed059ab3
parent ad3087af
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment