diff options
authorPeter Maydell <peter.maydell@linaro.org>2014-06-24 12:06:28 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-06-24 12:06:28 +0100
commit1afdbfbd02ee8f6ff0123eee4313db49a27cf793 (patch)
parentc6ae575e58da5c9788185722d073227519ab2b97 (diff)
android_adb: Listen for ADB connections on, 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 to ensure we are listening where the adb server expects to find us. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
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("", port);
fd = inet_listen(host_port, NULL, 0, SOCK_STREAM, 0, &err);
if (fd < 0) {
return false;