util/qemu-sockets: Make inet_connect_saddr() public
Make inet_connect_saddr() in util/qemu-sockets.c public in order to be able to use it with InetSocketAddress sockets outside of util/qemu-sockets.c independently. Signed-off-by: Ashijeet Acharya <ashijeetacharya@gmail.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
89dbe18089
commit
89cadc9dc0
@ -34,6 +34,8 @@ typedef void NonBlockingConnectHandler(int fd, Error *err, void *opaque);
|
||||
|
||||
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);
|
||||
|
||||
NetworkAddressFamily inet_netfamily(int family);
|
||||
|
||||
|
@ -412,8 +412,8 @@ 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.
|
||||
*/
|
||||
static int inet_connect_saddr(InetSocketAddress *saddr, Error **errp,
|
||||
NonBlockingConnectHandler *callback, void *opaque)
|
||||
int inet_connect_saddr(InetSocketAddress *saddr, Error **errp,
|
||||
NonBlockingConnectHandler *callback, void *opaque)
|
||||
{
|
||||
Error *local_err = NULL;
|
||||
struct addrinfo *res, *e;
|
||||
|
Loading…
Reference in New Issue
Block a user