aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--block/ssh.c2
-rw-r--r--include/qemu/sockets.h5
-rw-r--r--util/qemu-sockets.c9
3 files changed, 9 insertions, 7 deletions
diff --git a/block/ssh.c b/block/ssh.c
index 471ba8a260..df09f6c5ba 100644
--- a/block/ssh.c
+++ b/block/ssh.c
@@ -681,7 +681,7 @@ static int connect_to_ssh(BDRVSSHState *s, QDict *options,
}
/* Open the socket and connect. */
- s->sock = inet_connect_saddr(s->inet, errp, NULL, NULL);
+ s->sock = inet_connect_saddr(s->inet, NULL, NULL, errp);
if (s->sock < 0) {
ret = -EIO;
goto err;
diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h
index 567eef1a91..af285321b8 100644
--- a/include/qemu/sockets.h
+++ b/include/qemu/sockets.h
@@ -36,8 +36,9 @@ int inet_ai_family_from_address(InetSocketAddress *addr,
Error **errp);
InetSocketAddress *inet_parse(const char *str, Error **errp);
int inet_connect(const char *str, Error **errp);
-int inet_connect_saddr(InetSocketAddress *saddr, Error **errp,
- NonBlockingConnectHandler *callback, void *opaque);
+int inet_connect_saddr(InetSocketAddress *saddr,
+ NonBlockingConnectHandler *callback, void *opaque,
+ Error **errp);
NetworkAddressFamily inet_netfamily(int family);
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
index f79d3342fc..8e11349b72 100644
--- a/util/qemu-sockets.c
+++ b/util/qemu-sockets.c
@@ -427,8 +427,9 @@ static struct addrinfo *inet_parse_connect_saddr(InetSocketAddress *saddr,
* function succeeds, callback will be called when the connection
* completes, with the file descriptor on success, or -1 on error.
*/
-int inet_connect_saddr(InetSocketAddress *saddr, Error **errp,
- NonBlockingConnectHandler *callback, void *opaque)
+int inet_connect_saddr(InetSocketAddress *saddr,
+ NonBlockingConnectHandler *callback, void *opaque,
+ Error **errp)
{
Error *local_err = NULL;
struct addrinfo *res, *e;
@@ -659,7 +660,7 @@ int inet_connect(const char *str, Error **errp)
addr = inet_parse(str, errp);
if (addr != NULL) {
- sock = inet_connect_saddr(addr, errp, NULL, NULL);
+ sock = inet_connect_saddr(addr, NULL, NULL, errp);
qapi_free_InetSocketAddress(addr);
}
return sock;
@@ -1081,7 +1082,7 @@ int socket_connect(SocketAddress *addr, NonBlockingConnectHandler *callback,
switch (addr->type) {
case SOCKET_ADDRESS_KIND_INET:
- fd = inet_connect_saddr(addr->u.inet.data, errp, callback, opaque);
+ fd = inet_connect_saddr(addr->u.inet.data, callback, opaque, errp);
break;
case SOCKET_ADDRESS_KIND_UNIX: