diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-06-24 12:06:28 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-06-24 12:06:28 +0100 |
commit | 1afdbfbd02ee8f6ff0123eee4313db49a27cf793 (patch) | |
tree | a09825ad7480b74902548696bd4ff2a79c2645b6 | |
parent | c6ae575e58da5c9788185722d073227519ab2b97 (diff) | |
download | qemu-arm-ranchu-linaro-beta1.tar.gz |
android_adb: Listen for ADB connections on 127.0.0.1, not localhostranchu-linaro-beta1ranchu
QEMU's inet_listen() routine only listens on the first result
it gets back for the hostname it is passed; if that is an IPv6
address, as it is on Windows, then we end up listening on the
IPv6 loopback address, and the adb server fails to connect to
us because it is expecting to use IPv4. Use the explicit IPv4
loopback address 127.0.0.1 to ensure we are listening where
the adb server expects to find us.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | hw/misc/android_adb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/misc/android_adb.c b/hw/misc/android_adb.c index 68da548a0f..3fbfe51ce3 100644 --- a/hw/misc/android_adb.c +++ b/hw/misc/android_adb.c @@ -331,7 +331,7 @@ static bool adb_server_listen_incoming(int port) Error *err = NULL; int fd; - host_port = g_strdup_printf("localhost:%d", port); + host_port = g_strdup_printf("127.0.0.1:%d", port); fd = inet_listen(host_port, NULL, 0, SOCK_STREAM, 0, &err); if (fd < 0) { return false; |