diff options
author | Markus Armbruster <armbru@redhat.com> | 2015-01-13 17:07:15 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2015-01-29 09:58:56 +0100 |
commit | b25d81ba332dc06757d40ffe64944ba27082de0a (patch) | |
tree | fe7ca152bebf917ff97ddcbb1b4e01d4e5d47f5f /monitor.c | |
parent | 83761b9244ad2ed39d3cfabe8a0e901ab906f7bf (diff) |
qmp hmp: Factor out common "using spice" test
Into qemu_using_spice(). For want of a better place, put it next the
existing monitor command handler dummies in qemu-spice.h.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1095,11 +1095,12 @@ static int client_migrate_info(Monitor *mon, const QDict *qdict, const char *subject = qdict_get_try_str(qdict, "cert-subject"); int port = qdict_get_try_int(qdict, "port", -1); int tls_port = qdict_get_try_int(qdict, "tls-port", -1); + Error *err; int ret; if (strcmp(protocol, "spice") == 0) { - if (!using_spice) { - qerror_report(QERR_DEVICE_NOT_ACTIVE, "spice"); + if (!qemu_using_spice(&err)) { + qerror_report_err(err); return -1; } |