mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 1200132 - Part2: Get IP address by calling InetAddress.getHostAddress(), r=mcmanus, rnewman
This commit is contained in:
parent
42ddfe4f02
commit
f182f7563e
@ -204,7 +204,8 @@ class NsdMulticastDNSManager extends MulticastDNSManager implements NativeEventL
|
||||
|
||||
InetAddress host = serviceInfo.getHost();
|
||||
if (host != null) {
|
||||
obj.put("host", host.getHostName());
|
||||
obj.put("host", host.getCanonicalHostName());
|
||||
obj.put("address", host.getHostAddress());
|
||||
}
|
||||
|
||||
int port = serviceInfo.getPort();
|
||||
|
@ -41,7 +41,7 @@ ListenerWrapper.prototype = {
|
||||
makeServiceInfo: function (aServiceInfo) {
|
||||
let serviceInfo = Cc[DNSSERVICEINFO_CONTRACT_ID].createInstance(Ci.nsIDNSServiceInfo);
|
||||
|
||||
for (let name of ['host', 'port', 'serviceName', 'serviceType']) {
|
||||
for (let name of ['host', 'address', 'port', 'serviceName', 'serviceType']) {
|
||||
try {
|
||||
serviceInfo[name] = aServiceInfo[name];
|
||||
} catch (e) {
|
||||
|
Loading…
Reference in New Issue
Block a user