mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
Change qemu_set_fd_handler2(..., NULL, ...) to qemu_set_fd_handler
Done with following Coccinelle semantic patch, plus manual cosmetic changes in
net/*.c.
@@
expression E1, E2, E3, E4;
@@
- qemu_set_fd_handler2(E1, NULL, E2, E3, E4);
+ qemu_set_fd_handler(E1, E2, E3, E4);
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-id: 1433400324-7358-8-git-send-email-famz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
committed by
Stefan Hajnoczi
parent
a90a7425cf
commit
82e1cc4bf9
@@ -244,7 +244,7 @@ static void wait_for_connect(void *opaque)
|
||||
bool in_progress;
|
||||
Error *err = NULL;
|
||||
|
||||
qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL);
|
||||
qemu_set_fd_handler(s->fd, NULL, NULL, NULL);
|
||||
|
||||
do {
|
||||
rc = qemu_getsockopt(s->fd, SOL_SOCKET, SO_ERROR, &val, &valsize);
|
||||
@@ -316,8 +316,7 @@ static int inet_connect_addr(struct addrinfo *addr, bool *in_progress,
|
||||
|
||||
if (connect_state != NULL && QEMU_SOCKET_RC_INPROGRESS(rc)) {
|
||||
connect_state->fd = sock;
|
||||
qemu_set_fd_handler2(sock, NULL, NULL, wait_for_connect,
|
||||
connect_state);
|
||||
qemu_set_fd_handler(sock, NULL, wait_for_connect, connect_state);
|
||||
*in_progress = true;
|
||||
} else if (rc < 0) {
|
||||
error_setg_errno(errp, errno, "Failed to connect socket");
|
||||
@@ -796,8 +795,7 @@ int unix_connect_opts(QemuOpts *opts, Error **errp,
|
||||
|
||||
if (connect_state != NULL && QEMU_SOCKET_RC_INPROGRESS(rc)) {
|
||||
connect_state->fd = sock;
|
||||
qemu_set_fd_handler2(sock, NULL, NULL, wait_for_connect,
|
||||
connect_state);
|
||||
qemu_set_fd_handler(sock, NULL, wait_for_connect, connect_state);
|
||||
return sock;
|
||||
} else if (rc >= 0) {
|
||||
/* non blocking socket immediate success, call callback */
|
||||
|
||||
Reference in New Issue
Block a user