qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: Cao jin <caoj.fnst@cn.fujitsu.com>,
	"Daniel P . Berrange" <berrange@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PULL 05/25] util: drop inet_nonblocking_connect()
Date: Tue,  2 Aug 2016 21:39:15 +0200	[thread overview]
Message-ID: <1470166775-3671-6-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1470166775-3671-1-git-send-email-pbonzini@redhat.com>

From: Cao jin <caoj.fnst@cn.fujitsu.com>

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>
---
 include/qemu/sockets.h |  3 ---
 util/qemu-sockets.c    | 30 ------------------------------
 2 files changed, 33 deletions(-)

diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h
index 5fe01fb..2cbe643 100644
--- a/include/qemu/sockets.h
+++ b/include/qemu/sockets.h
@@ -36,9 +36,6 @@ InetSocketAddress *inet_parse(const char *str, Error **errp);
 int inet_listen(const char *str, char *ostr, int olen,
                 int socktype, int port_offset, Error **errp);
 int inet_connect(const char *str, Error **errp);
-int inet_nonblocking_connect(const char *str,
-                             NonBlockingConnectHandler *callback,
-                             void *opaque, Error **errp);
 
 NetworkAddressFamily inet_netfamily(int family);
 
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
index 777af49..2e0570b 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,
-- 
2.7.4

  parent reply	other threads:[~2016-08-02 19:39 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-02 19:39 [Qemu-devel] [PULL 00/25] Misc QEMU fixes for 2016-08-02 Paolo Bonzini
2016-08-02 19:39 ` [Qemu-devel] [PULL 01/25] util/qht: Document memory ordering assumptions Paolo Bonzini
2016-08-02 19:39 ` [Qemu-devel] [PULL 02/25] numa: set the memory backend "is_mapped" field Paolo Bonzini
2016-08-02 19:39 ` [Qemu-devel] [PULL 03/25] fix qemu exit on memory hotplug when allocation fails at prealloc time Paolo Bonzini
2016-08-02 19:39 ` [Qemu-devel] [PULL 04/25] checkpatch: add check for bzero Paolo Bonzini
2016-08-02 19:39 ` Paolo Bonzini [this message]
2016-08-02 19:39 ` [Qemu-devel] [PULL 06/25] util: drop unix_nonblocking_connect() Paolo Bonzini
2016-08-02 19:39 ` [Qemu-devel] [PULL 07/25] util: Drop inet_listen() Paolo Bonzini
2016-08-02 19:39 ` [Qemu-devel] [PULL 08/25] qht: do not segfault when gathering stats from an uninitialized qht Paolo Bonzini
2016-08-02 19:39 ` [Qemu-devel] [PULL 09/25] target-i386: fix typo in xsetbv implementation Paolo Bonzini
2016-08-02 19:39 ` [Qemu-devel] [PULL 10/25] qdist: fix memory leak during binning Paolo Bonzini
2016-08-02 21:13   ` Marc-André Lureau
2016-08-02 19:39 ` [Qemu-devel] [PULL 11/25] qdist: use g_realloc_n instead of g_realloc Paolo Bonzini
2016-08-02 19:39 ` [Qemu-devel] [PULL 12/25] qdist: return "(empty)" instead of NULL when printing an empty dist Paolo Bonzini
2016-08-02 19:39 ` [Qemu-devel] [PULL 13/25] mptsas: really fix migration compatibility Paolo Bonzini
2016-08-02 19:39 ` [Qemu-devel] [PULL 14/25] i2c: fix migration regression introduced by broadcast support Paolo Bonzini
2016-08-02 19:39 ` [Qemu-devel] [PULL 15/25] nbd: Fix bad flag detection on server Paolo Bonzini
2016-08-02 19:39 ` [Qemu-devel] [PULL 16/25] nbd: Limit nbdflags to 16 bits Paolo Bonzini
2016-08-02 19:39 ` [Qemu-devel] [PULL 17/25] osdep: Document differences in rounding macros Paolo Bonzini
2016-08-02 19:39 ` [Qemu-devel] [PULL 18/25] block: Cater to iscsi with non-power-of-2 discard Paolo Bonzini
2016-08-02 19:39 ` [Qemu-devel] [PULL 19/25] fw_cfg: Make base type "fw_cfg" abstract Paolo Bonzini
2016-08-02 19:39 ` [Qemu-devel] [PULL 20/25] apic: fix broken migration for kvm-apic Paolo Bonzini
2016-08-02 19:39 ` [Qemu-devel] [PULL 21/25] x86: ioapic: ignore level irq during processing Paolo Bonzini
2016-08-02 19:39 ` [Qemu-devel] [PULL 22/25] x86: ioapic: add support for explicit EOI Paolo Bonzini
2016-08-02 19:39 ` [Qemu-devel] [PULL 23/25] Reorganize help output of '-display' option Paolo Bonzini
2016-08-02 19:39 ` [Qemu-devel] [PULL 24/25] qdev: Fix use after free in qdev_init_nofail error path Paolo Bonzini
2016-08-02 19:39 ` [Qemu-devel] [PULL 25/25] util: Fix assertion in iov_copy() upon zero 'bytes' and non-zero 'offset' Paolo Bonzini
2016-08-03 10:52 ` [Qemu-devel] [PULL 00/25] Misc QEMU fixes for 2016-08-02 Peter Maydell
2016-08-03 16:24   ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1470166775-3671-6-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=berrange@redhat.com \
    --cc=caoj.fnst@cn.fujitsu.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).