socket: Make errp the last parameter of unix_connect_saddr

Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <20170421122710.15373-4-famz@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
Fam Zheng 2017-04-21 20:26:59 +08:00 committed by Markus Armbruster
parent 6dffc1f670
commit 2bdc6791b9

View File

@ -911,8 +911,9 @@ err:
return -1;
}
static int unix_connect_saddr(UnixSocketAddress *saddr, Error **errp,
NonBlockingConnectHandler *callback, void *opaque)
static int unix_connect_saddr(UnixSocketAddress *saddr,
NonBlockingConnectHandler *callback, void *opaque,
Error **errp)
{
struct sockaddr_un un;
ConnectState *connect_state = NULL;
@ -979,8 +980,9 @@ static int unix_listen_saddr(UnixSocketAddress *saddr,
return -1;
}
static int unix_connect_saddr(UnixSocketAddress *saddr, Error **errp,
NonBlockingConnectHandler *callback, void *opaque)
static int unix_connect_saddr(UnixSocketAddress *saddr,
NonBlockingConnectHandler *callback, void *opaque,
Error **errp)
{
error_setg(errp, "unix sockets are not available on windows");
errno = ENOTSUP;
@ -1026,7 +1028,7 @@ int unix_connect(const char *path, Error **errp)
saddr = g_new0(UnixSocketAddress, 1);
saddr->path = g_strdup(path);
sock = unix_connect_saddr(saddr, errp, NULL, NULL);
sock = unix_connect_saddr(saddr, NULL, NULL, errp);
qapi_free_UnixSocketAddress(saddr);
return sock;
}
@ -1086,7 +1088,7 @@ int socket_connect(SocketAddress *addr, NonBlockingConnectHandler *callback,
break;
case SOCKET_ADDRESS_KIND_UNIX:
fd = unix_connect_saddr(addr->u.q_unix.data, errp, callback, opaque);
fd = unix_connect_saddr(addr->u.q_unix.data, callback, opaque, errp);
break;
case SOCKET_ADDRESS_KIND_FD: