mirror of https://gitee.com/openkylin/qemu.git
spice: small fixes
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJTa0VNAAoJEEy22O7T6HE4pB4P/2PRctHcuwlOKCysALN4N1nP zi/9eDSmbJAw7ZF8nsSoYQzL/yluFvQeBuIiWvlTI1fWSkFidNtVJQ5fh2N6SoRm vHISWZlIBUfpWRghAJ9Fwe/u/7n+dZ1/mQEApdkgwqiFhY7Z0Oa8colvvtMj8bwg n95Tuk4k7WAAS2j+ElKAUNiWc7O3RYLoDJOFOCEt4k0Wn25GXTHVub5v5N4bAoY1 cdbq5gEkBd7V/SdLckUBfJl7hvNFqrvH/XIRf5dv9TrgOSuseeThTCF8sD+4K259 yGFXdcWLO3nNjzULEI0zchpYTy+HLj0KhL8UUjfgqNJXz3QxOV7OLuBnqXMdbson IgW/abflOBc+b8MTg8c9k5Zg/K4R8YBX+TGgu8GRZrnrIQJOI89LeAAxBagagBSE sWFI1aIEs0WjdRbAEjn2aUIIxpeLbB43ba4SGuKGdIkuojSXASJwN7aLdTZMmLDG Asa/z+/fn5F5FYl816w/Ejsx6jNp3RMA/bOIkOgu1x6KE2YkdrIam+2YxPUPUuAx 3O13E4ChH7YiDktWVoTVKdHg4mMYI8KFm6REPAvi46LfGIfh/TPfBhaA/mbgsXqx Rsh/YYdTA8EP8bZfAFdpwaNSaRLY6AEUUtWe1SFShLYSLJM6ClXUlOEWlQHEfs9k xYWicB46isRQ9zavDYWm =Y5y/ -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/spice/tags/pull-spice-7' into staging spice: small fixes # gpg: Signature made Thu 08 May 2014 09:50:21 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/spice/tags/pull-spice-7: spice: fix libvirt snapshots spice: fix "info spice" Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
6b342cc9c8
|
@ -48,6 +48,7 @@ static char *auth_passwd;
|
|||
static time_t auth_expires = TIME_MAX;
|
||||
static int spice_migration_completed;
|
||||
static int spice_display_is_running;
|
||||
static int spice_have_target_host;
|
||||
int using_spice = 0;
|
||||
|
||||
static QemuThread me;
|
||||
|
@ -532,7 +533,7 @@ SpiceInfo *qmp_query_spice(Error **errp)
|
|||
info->auth = g_strdup(auth);
|
||||
|
||||
info->has_host = true;
|
||||
info->host = g_strdup(addr ? addr : "0.0.0.0");
|
||||
info->host = g_strdup(addr ? addr : "*");
|
||||
|
||||
info->has_compiled_version = true;
|
||||
major = (SPICE_SERVER_VERSION & 0xff0000) >> 16;
|
||||
|
@ -564,12 +565,18 @@ static void migration_state_notifier(Notifier *notifier, void *data)
|
|||
{
|
||||
MigrationState *s = data;
|
||||
|
||||
if (!spice_have_target_host) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (migration_in_setup(s)) {
|
||||
spice_server_migrate_start(spice_server);
|
||||
} else if (migration_has_finished(s)) {
|
||||
spice_server_migrate_end(spice_server, true);
|
||||
spice_have_target_host = false;
|
||||
} else if (migration_has_failed(s)) {
|
||||
spice_server_migrate_end(spice_server, false);
|
||||
spice_have_target_host = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -583,6 +590,7 @@ int qemu_spice_migrate_info(const char *hostname, int port, int tls_port,
|
|||
spice_migrate.connect_complete.opaque = opaque;
|
||||
ret = spice_server_migrate_connect(spice_server, hostname,
|
||||
port, tls_port, subject);
|
||||
spice_have_target_host = true;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue