mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 754305 - SUTAgent should always print ipv4 address. r=jmaher
This commit is contained in:
parent
8a77bd6592
commit
db1eb2f1dc
@ -40,6 +40,7 @@ package com.mozilla.SUTAgentAndroid;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
|
import org.apache.http.conn.util.InetAddressUtils;
|
||||||
import java.net.NetworkInterface;
|
import java.net.NetworkInterface;
|
||||||
import java.net.SocketException;
|
import java.net.SocketException;
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
@ -665,7 +666,7 @@ public class SUTAgentAndroid extends Activity
|
|||||||
for (Enumeration<InetAddress> enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements();)
|
for (Enumeration<InetAddress> enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements();)
|
||||||
{
|
{
|
||||||
InetAddress inetAddress = enumIpAddr.nextElement();
|
InetAddress inetAddress = enumIpAddr.nextElement();
|
||||||
if (!inetAddress.isLoopbackAddress())
|
if (!inetAddress.isLoopbackAddress() && InetAddressUtils.isIPv4Address(inetAddress.getHostAddress()))
|
||||||
{
|
{
|
||||||
return inetAddress.getHostAddress().toString();
|
return inetAddress.getHostAddress().toString();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user