NSD: Specify on what interface to getAddrInfo
When discover two different host with same host name from different network interface, specify on what interface to getAddrInfo. Bug: 203453164 Test: build & manual Signed-off-by: hepengtao <hept.hept.hept@gmail.com> Change-Id: Ifaccb7f3fac6b1dd789cc9ce7c8d964102754508
This commit is contained in:
committed by
Remi NGUYEN VAN
parent
2ed5ef560c
commit
f6f9aa2b9a
@@ -488,7 +488,7 @@ public class NsdService extends INsdManager.Stub {
|
||||
removeRequestMap(clientId, id, clientInfo);
|
||||
|
||||
int id2 = getUniqueId();
|
||||
if (getAddrInfo(id2, cooked[3])) {
|
||||
if (getAddrInfo(id2, cooked[3], cooked[7])) {
|
||||
storeRequestMap(clientId, id2, clientInfo, NsdManager.RESOLVE_SERVICE);
|
||||
} else {
|
||||
clientInfo.onResolveServiceFailed(
|
||||
@@ -833,8 +833,8 @@ public class NsdService extends INsdManager.Stub {
|
||||
return mDaemon.execute("stop-resolve", resolveId);
|
||||
}
|
||||
|
||||
private boolean getAddrInfo(int resolveId, String hostname) {
|
||||
return mDaemon.execute("getaddrinfo", resolveId, hostname);
|
||||
private boolean getAddrInfo(int resolveId, String hostname, String interfaceName) {
|
||||
return mDaemon.execute("getaddrinfo", resolveId, hostname, interfaceName);
|
||||
}
|
||||
|
||||
private boolean stopGetAddrInfo(int resolveId) {
|
||||
|
||||
Reference in New Issue
Block a user