#include "io-channel-helpers.h"
#include "socket-helpers.h"
#include "qapi/error.h"
+#include "qemu/module.h"
static void test_io_channel_set_socket_bufs(QIOChannel *src,
QIOChannelSocket *lioc;
lioc = qio_channel_socket_new();
- qio_channel_socket_listen_sync(lioc, listen_addr, &error_abort);
+ qio_channel_socket_listen_sync(lioc, listen_addr, 1, &error_abort);
if (listen_addr->type == SOCKET_ADDRESS_TYPE_INET) {
SocketAddress *laddr = qio_channel_socket_get_local_address(
lioc = qio_channel_socket_new();
qio_channel_socket_listen_async(
- lioc, listen_addr,
+ lioc, listen_addr, 1,
test_io_channel_complete, &data, NULL, NULL);
g_main_loop_run(data.loop);
* with either IPv4 or IPv6 disabled.
*/
if (socket_check_protocol_support(&has_ipv4, &has_ipv6) < 0) {
- return 1;
+ g_printerr("socket_check_protocol_support() failed\n");
+ goto end;
}
if (has_ipv4) {
test_io_channel_unix_listen_cleanup);
#endif /* _WIN32 */
+end:
return g_test_run();
}