diff options
author | Eric Blake <eblake@redhat.com> | 2016-06-09 10:48:45 -0600 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2016-07-06 10:52:04 +0200 |
commit | 37f9e0a2b65a6dd5fe09cb0023b8001014aaaf01 (patch) | |
tree | d1fe710730adff2fa1c31449e380dbb38fad6ea6 /util | |
parent | a15fcc3cf69ee3d408f60d6cc316488d2b0249b4 (diff) | |
download | qemu-37f9e0a2b65a6dd5fe09cb0023b8001014aaaf01.tar.gz qemu-37f9e0a2b65a6dd5fe09cb0023b8001014aaaf01.tar.bz2 qemu-37f9e0a2b65a6dd5fe09cb0023b8001014aaaf01.zip |
sockets: Use new QAPI cloning
Rather than rolling our own clone via an expensive conversion
in and back out of QObject, use the new clone visitor.
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1465490926-28625-15-git-send-email-eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'util')
-rw-r--r-- | util/qemu-sockets.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c index a0ca6d4a7e..fb83d48944 100644 --- a/util/qemu-sockets.c +++ b/util/qemu-sockets.c @@ -1143,29 +1143,6 @@ SocketAddress *socket_remote_address(int fd, Error **errp) return socket_sockaddr_to_address(&ss, sslen, errp); } - -void qapi_copy_SocketAddress(SocketAddress **p_dest, - SocketAddress *src) -{ - Visitor *ov, *iv; - QObject *obj; - - *p_dest = NULL; - - ov = qmp_output_visitor_new(&obj); - visit_type_SocketAddress(ov, NULL, &src, &error_abort); - visit_complete(ov, &obj); - visit_free(ov); - if (!obj) { - return; - } - - iv = qmp_input_visitor_new(obj, true); - visit_type_SocketAddress(iv, NULL, p_dest, &error_abort); - visit_free(iv); - qobject_decref(obj); -} - char *socket_address_to_string(struct SocketAddress *addr, Error **errp) { char *buf; |