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
Loading
Please register or sign in to comment