summaryrefslogtreecommitdiffstats
path: root/server/reds.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2011-07-21 14:57:35 +0200
committerHans de Goede <hdegoede@redhat.com>2011-07-21 14:59:26 +0200
commit765948d449338d0dd99e003d4a1158b8b8d26cf1 (patch)
tree47a9503d71a2efa05f98c5e29b502a43a01875c8 /server/reds.c
parent419222f0f3de82b14960938263d06cc36b9e1a84 (diff)
downloadspice-765948d449338d0dd99e003d4a1158b8b8d26cf1.tar.gz
spice-765948d449338d0dd99e003d4a1158b8b8d26cf1.tar.xz
spice-765948d449338d0dd99e003d4a1158b8b8d26cf1.zip
server: make sure we clear vdagent and update mouse mode on agent disconnect
The check this patch removes causes us to not set vdagent to NULL, nor update the mouse mode when the guest agent disconnects when no client is attached. Which leads to a non working mouse, and on agent reconnect a "spice_server_char_device_add_interface: vdagent already attached" message instead of a successful re-add of the agent interface . hansg: Note this is commit 443994ba from the 0.8 branch, which I did not forward port back then because it seemed unnecessary on master, but it turns out that the (wrong) check was just hidden in another place on master.
Diffstat (limited to 'server/reds.c')
-rw-r--r--server/reds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/reds.c b/server/reds.c
index ee24e871..e9694c06 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3249,7 +3249,7 @@ static void spice_server_char_device_remove_interface(SpiceBaseInstance *sin)
red_printf("remove CHAR_DEVICE %s", char_device->subtype);
if (strcmp(char_device->subtype, SUBTYPE_VDAGENT) == 0) {
- if (vdagent && reds->agent_state.connected) {
+ if (vdagent) {
reds_agent_remove();
}
}