aboutsummaryrefslogtreecommitdiff
path: root/qemu-char.c
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2015-08-14 18:18:41 +0100
committerDaniel P. Berrange <berrange@redhat.com>2015-10-20 14:15:48 +0100
commit2a8e21c7c8dcb7d235cfd256be36b7e8f9f3fcb3 (patch)
tree0d79b4d9d102238afc754ea766da58100e6afc99 /qemu-char.c
parent17c55decec2a516cf7f290ec8a5f4f207531e8b4 (diff)
downloadqemu-2a8e21c7c8dcb7d235cfd256be36b7e8f9f3fcb3.zip
qemu-2a8e21c7c8dcb7d235cfd256be36b7e8f9f3fcb3.tar.gz
qemu-2a8e21c7c8dcb7d235cfd256be36b7e8f9f3fcb3.tar.bz2
sockets: move qapi_copy_SocketAddress into qemu-sockets.c
The qapi_copy_SocketAddress method is going to be useful in more places than just qemu-char.c, so move it into the qemu-sockets.c file to allow its reuse. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'qemu-char.c')
-rw-r--r--qemu-char.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/qemu-char.c b/qemu-char.c
index 13371c4..908e712 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -92,31 +92,6 @@
/***********************************************************/
/* Socket address helpers */
-static void qapi_copy_SocketAddress(SocketAddress **p_dest,
- SocketAddress *src)
-{
- QmpOutputVisitor *qov;
- QmpInputVisitor *qiv;
- Visitor *ov, *iv;
- QObject *obj;
-
- *p_dest = NULL;
-
- qov = qmp_output_visitor_new();
- ov = qmp_output_get_visitor(qov);
- visit_type_SocketAddress(ov, &src, NULL, &error_abort);
- obj = qmp_output_get_qobject(qov);
- qmp_output_visitor_cleanup(qov);
- if (!obj) {
- return;
- }
-
- qiv = qmp_input_visitor_new(obj);
- iv = qmp_input_get_visitor(qiv);
- visit_type_SocketAddress(iv, p_dest, NULL, &error_abort);
- qmp_input_visitor_cleanup(qiv);
- qobject_decref(obj);
-}
static int SocketAddress_to_str(char *dest, int max_len,
const char *prefix, SocketAddress *addr,