mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
sockets: use error class to pass listen error
Add a new argument in inet_listen()/inet_listen_opts() to pass back listen error. Change nbd, qemu-char, vnc to use new interface. Signed-off-by: Amos Kong <akong@redhat.com> Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
a6ba35b3be
commit
029409e5a9
5 changed files with 20 additions and 8 deletions
2
nbd.c
2
nbd.c
|
@ -176,7 +176,7 @@ int tcp_socket_incoming_spec(const char *address_and_port)
|
|||
{
|
||||
char *ostr = NULL;
|
||||
int olen = 0;
|
||||
return inet_listen(address_and_port, ostr, olen, SOCK_STREAM, 0);
|
||||
return inet_listen(address_and_port, ostr, olen, SOCK_STREAM, 0, NULL);
|
||||
}
|
||||
|
||||
int unix_socket_incoming(const char *path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue