aboutsummaryrefslogtreecommitdiff
path: root/util/qemu-sockets.c
diff options
context:
space:
mode:
authorCao jin <caoj.fnst@cn.fujitsu.com>2016-07-21 18:33:32 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2016-08-02 12:03:58 +0200
commit00432b69538559285ca55677c1002cad556aea50 (patch)
treed650d998c3896636a3679bd6fee81bc1d6168dac /util/qemu-sockets.c
parent3f822cff4473fd6313f6c06623edf148b3ad2cc6 (diff)
util: drop inet_nonblocking_connect()
It is never used; all nonblocking connect now goes through socket_connect(), which calls inet_connect_addr(). Cc: Daniel P. Berrange <berrange@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com> Message-Id: <1469097213-26441-2-git-send-email-caoj.fnst@cn.fujitsu.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'util/qemu-sockets.c')
-rw-r--r--util/qemu-sockets.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
index 777af49d53..2e0570b2b7 100644
--- a/util/qemu-sockets.c
+++ b/util/qemu-sockets.c
@@ -674,36 +674,6 @@ int inet_connect(const char *str, Error **errp)
return sock;
}
-/**
- * Create a non-blocking socket and connect it to an address.
- * Calls the callback function with fd in case of success or -1 in case of
- * error.
- *
- * @str: address string
- * @callback: callback function that is called when connect completes,
- * cannot be NULL.
- * @opaque: opaque for callback function
- * @errp: set in case of an error
- *
- * Returns: -1 on immediate error, file descriptor on success.
- **/
-int inet_nonblocking_connect(const char *str,
- NonBlockingConnectHandler *callback,
- void *opaque, Error **errp)
-{
- int sock = -1;
- InetSocketAddress *addr;
-
- g_assert(callback != NULL);
-
- addr = inet_parse(str, errp);
- if (addr != NULL) {
- sock = inet_connect_saddr(addr, errp, callback, opaque);
- qapi_free_InetSocketAddress(addr);
- }
- return sock;
-}
-
#ifndef _WIN32
static int unix_listen_saddr(UnixSocketAddress *saddr,