diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-01-10 10:31:59 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2012-01-10 13:26:58 +0100 |
commit | 10ab81dee0f73df55be6bfab22c4fbce9473f6ff (patch) | |
tree | f43af761c597fa8e947897974d68477ef02a0563 | |
parent | e75b4dbe72bed29e214fd10d2c8ae135d8f15d20 (diff) |
vdagentd: Close the virtio port when the active vdagent disconnects
We cannot use agent mouse mode without the session vdagent process, as we
need to know the resolution the client is running at. So we should
close the virtio port when the active vdagent disconnects, so that the
spice-server switches back to server mouse mode.
We were not properly updating active_session_conn when compiled without
consolekit support, which causes us to not close the virtio port, this patch
fixes this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r-- | src/vdagentd.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vdagentd.c b/src/vdagentd.c index 8c0588f..ea5a0d0 100644 --- a/src/vdagentd.c +++ b/src/vdagentd.c @@ -549,6 +549,11 @@ void agent_disconnect(struct udscs_connection *conn) { struct agent_data *agent_data = udscs_get_user_data(conn); +#ifndef HAVE_CONSOLE_KIT + if (conn == active_session_conn) + active_session_conn = NULL; +#endif + free(agent_data->session); agent_data->session = NULL; update_active_session_connection(); |