This fixes sock_address_init_resolv() to properly parse the linked-list returned by getaddrinfo().

The previous implementation simply took the first entry, which could be an IPv6 address
instead of an IPv4 one in certain OS setups. This created problems when "localhost" resolved
to :::1 instead of 127.0.0.1. For example, when implementing inter-emulator telephony or SMS,
since the caller would try to connect to localhost:5556, which was resolved to :::1:5556 while
the received is listening on 127.0.0.1:5556

Also disable debugging traces that should not be activated. And make the error messages in
sockets.c only dumped to the terminal when -debug-socket is active.
2 files changed
tree: 9d789cdf76045d2f72a03527e4f24f3cf30f069c
  1. android/
  2. audio/
  3. distrib/
  4. docs/
  5. fpu/
  6. hw/
  7. images/
  8. proxy/
  9. slirp2/
  10. target-arm/
  11. tcg/
  12. telephony/
  13. a.out.h
  14. aes.c
  15. aes.h
  16. alpha.ld
  17. android-configure.sh
  18. android-rebuild.sh
  19. Android.mk
  20. arm-dis.c
  21. arm-semi.c
  22. arm.ld
  23. block-bochs.c
  24. block-cloop.c
  25. block-cow.c
  26. block-dmg.c
  27. block-nbd.c
  28. block-parallels.c
  29. block-qcow.c
  30. block-qcow2.c
  31. block-raw-posix.c
  32. block-raw-win32.c
  33. block-vmdk.c
  34. block-vpc.c
  35. block-vvfat.c
  36. block.c
  37. block.h
  38. block_int.h
  39. bswap.h
  40. cbuffer.c
  41. cbuffer.h
  42. Changelog
  43. CHANGES.TXT
  44. charpipe.c
  45. charpipe.h
  46. compatfd.c
  47. compatfd.h
  48. console.c
  49. console.h
  50. COPYING
  51. COPYING.LIB
  52. cpu-all.h
  53. cpu-defs.h
  54. cpu-exec.c
  55. curses.c
  56. curses_keys.h
  57. cutils.c
  58. d3des.c
  59. d3des.h
  60. dcache.c
  61. dcache.h
  62. dis-asm.h
  63. disas.c
  64. disas.h
  65. dyngen-exec.h
  66. dynlink.h
  67. elf.h
  68. elf_ops.h
  69. exec-all.h
  70. exec.c
  71. framebuffer.c
  72. framebuffer.h
  73. gdbstub.c
  74. gdbstub.h
  75. gen-charmap.py
  76. gen-icount.h
  77. gen-skin.py
  78. host-defs.h
  79. host-utils.c
  80. host-utils.h
  81. hostregs_helper.h
  82. hpet.h
  83. i386-dis.c
  84. i386-vl.ld
  85. i386.ld
  86. ia64.ld
  87. INSTALL
  88. keymaps.c
  89. kqemu.c
  90. kqemu.h
  91. LICENSE
  92. linux_keycodes.h
  93. loader.c
  94. loadpng.c
  95. m68k.ld
  96. Makefile
  97. Makefile.android
  98. MODULE_LICENSE_GPL
  99. monitor.c
  100. net.h
  101. NOTICE
  102. offset_layout.py
  103. osdep.c
  104. osdep.h
  105. ppc-dis.c
  106. ppc.ld
  107. qemu-char.h
  108. qemu-common.h
  109. qemu-lock.h
  110. qemu-log.h
  111. qemu-timer.h
  112. qemu_debug.h
  113. qemu_file.h
  114. qemu_socket.h
  115. qemu_timers.h
  116. readline.c
  117. README
  118. sdl_keysym.h
  119. shaper.c
  120. shaper.h
  121. sockets.c
  122. sockets.h
  123. softmmu-semi.h
  124. softmmu_defs.h
  125. softmmu_exec.h
  126. softmmu_header.h
  127. softmmu_template.h
  128. sparc.ld
  129. sysemu.h
  130. tap-win32.c
  131. tcpdump.c
  132. tcpdump.h
  133. thunk.c
  134. thunk.h
  135. trace.c
  136. trace.h
  137. trace_common.h
  138. translate-all.c
  139. translate-op.c
  140. translate.make
  141. uboot_image.h
  142. usb-linux.c
  143. varint.c
  144. varint.h
  145. vgafont.h
  146. vl.c
  147. vnc.c
  148. vnc_keysym.h
  149. vnchextile.h
  150. x86_64.ld