diff options
author | Wenchao Xia <wenchaoqemu@gmail.com> | 2014-06-18 08:43:30 +0200 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2014-06-23 11:01:25 -0400 |
commit | a589569f2f40a0454b52398035cfe7fbe44ab1e9 (patch) | |
tree | 4051a6ec079d736c41ea1ee07e903e0b9abf36a9 /ui/vnc.c | |
parent | f6dadb0242029e11640d9434efd39ec8211ea868 (diff) | |
download | qemu-a589569f2f40a0454b52398035cfe7fbe44ab1e9.zip qemu-a589569f2f40a0454b52398035cfe7fbe44ab1e9.tar.gz qemu-a589569f2f40a0454b52398035cfe7fbe44ab1e9.tar.bz2 |
qapi: adjust existing defines
In order to let event defines use existing types later, instead of
redefine new ones, some old type defines for spice and vnc are changed,
and BlockErrorAction is moved from block.h to qapi schema. Note that
BlockErrorAction is not merged with BlockdevOnError.
At this point, VncInfo is not made a child of VncBasicInfo, because
VncBasicInfo has mandatory fields where VncInfo makes them optional.
Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'ui/vnc.c')
-rw-r--r-- | ui/vnc.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -321,9 +321,10 @@ static VncClientInfo *qmp_query_vnc_client(const VncState *client) } info = g_malloc0(sizeof(*info)); - info->host = g_strdup(host); - info->service = g_strdup(serv); - info->family = g_strdup(inet_strfamily(sa.ss_family)); + info->base = g_malloc0(sizeof(*info->base)); + info->base->host = g_strdup(host); + info->base->service = g_strdup(serv); + info->base->family = inet_netfamily(sa.ss_family); #ifdef CONFIG_VNC_TLS if (client->tls.session && client->tls.dname) { @@ -398,7 +399,7 @@ VncInfo *qmp_query_vnc(Error **errp) info->service = g_strdup(serv); info->has_family = true; - info->family = g_strdup(inet_strfamily(sa.ss_family)); + info->family = inet_netfamily(sa.ss_family); info->has_auth = true; info->auth = g_strdup(vnc_auth_name(vnc_display)); |