diff options
author | Wang guang <wang.guang55@zte.com.cn> | 2017-04-03 12:05:21 +0100 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2017-04-04 16:17:03 +0100 |
commit | 0e5d6327f3abb8d582cbc2e444a23ef0dc6a64c7 (patch) | |
tree | 4128cfd4dbae9716127737bfab275b6fc0ef291b /io/channel-socket.c | |
parent | 87cc4c61020addea6a001b94b662596b1896d1b3 (diff) |
io: fix incoming client socket initialization
The channel socket was initialized manually, but forgot to set
QIO_CHANNEL_FEATURE_SHUTDOWN. Thus, the colo_process_incoming_thread
would hang at recvmsg. This patch just call qio_channel_socket_new to
get channel, Which set QIO_CHANNEL_FEATURE_SHUTDOWN already.
Signed-off-by: Wang Guang<wang.guang55@zte.com.cn>
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'io/channel-socket.c')
-rw-r--r-- | io/channel-socket.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/io/channel-socket.c b/io/channel-socket.c index f546c6830e..64b36f58be 100644 --- a/io/channel-socket.c +++ b/io/channel-socket.c @@ -331,16 +331,10 @@ qio_channel_socket_accept(QIOChannelSocket *ioc, { QIOChannelSocket *cioc; - cioc = QIO_CHANNEL_SOCKET(object_new(TYPE_QIO_CHANNEL_SOCKET)); - cioc->fd = -1; + cioc = qio_channel_socket_new(); cioc->remoteAddrLen = sizeof(ioc->remoteAddr); cioc->localAddrLen = sizeof(ioc->localAddr); -#ifdef WIN32 - QIO_CHANNEL(cioc)->event = CreateEvent(NULL, FALSE, FALSE, NULL); -#endif - - retry: trace_qio_channel_socket_accept(ioc); cioc->fd = qemu_accept(ioc->fd, (struct sockaddr *)&cioc->remoteAddr, |