summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-07-22 09:24:07 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-07-22 09:24:07 -0500
commite07fc405dc0432c712c9e36c70229f0428f86fa1 (patch)
treece9c33f6219633a9055fa377160d707cad7b80df
parent44129530ddf9edcc95913a4c05c755fb732c2bfe (diff)
parent8927cfbba232e28304734f7afd463c1b84134031 (diff)
downloadhqemu-e07fc405dc0432c712c9e36c70229f0428f86fa1.zip
hqemu-e07fc405dc0432c712c9e36c70229f0428f86fa1.tar.gz
Merge remote-tracking branch 'spice/spice.v39' into staging
-rw-r--r--hw/qxl.c4
-rw-r--r--ui/spice-core.c11
2 files changed, 12 insertions, 3 deletions
diff --git a/hw/qxl.c b/hw/qxl.c
index 0b9a4c7..a6fb7f0 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -656,8 +656,8 @@ static void qxl_reset_state(PCIQXLDevice *d)
QXLRam *ram = d->ram;
QXLRom *rom = d->rom;
- assert(SPICE_RING_IS_EMPTY(&ram->cmd_ring));
- assert(SPICE_RING_IS_EMPTY(&ram->cursor_ring));
+ assert(!d->ssd.running || SPICE_RING_IS_EMPTY(&ram->cmd_ring));
+ assert(!d->ssd.running || SPICE_RING_IS_EMPTY(&ram->cursor_ring));
d->shadow_rom.update_id = cpu_to_le32(0);
*rom = d->shadow_rom;
qxl_rom_set_dirty(d);
diff --git a/ui/spice-core.c b/ui/spice-core.c
index e142452..1100417 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -480,7 +480,16 @@ void qemu_spice_init(void)
port = qemu_opt_get_number(opts, "port", 0);
tls_port = qemu_opt_get_number(opts, "tls-port", 0);
if (!port && !tls_port) {
- return;
+ fprintf(stderr, "neither port nor tls-port specified for spice.");
+ exit(1);
+ }
+ if (port < 0 || port > 65535) {
+ fprintf(stderr, "spice port is out of range");
+ exit(1);
+ }
+ if (tls_port < 0 || tls_port > 65535) {
+ fprintf(stderr, "spice tls-port is out of range");
+ exit(1);
}
password = qemu_opt_get(opts, "password");
OpenPOWER on IntegriCloud