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

Commit 35992127 authored by hepengtao's avatar hepengtao Committed by Automerger Merge Worker
Browse files

NSD: Specify on what interface to getAddrInfo am: 985da199 am: 34fe8b70...

NSD: Specify on what interface to getAddrInfo am: 985da199 am: 34fe8b70 am: 65f276d3 am: 1b53c09e

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1862673

Change-Id: I100de625b5f2eca95a74637effecb1bbc54038a4
parents 00fc90e3 1b53c09e
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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) {