summaryrefslogtreecommitdiffstats
path: root/server/red_channel.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-02-08 10:04:18 +0100
committerHans de Goede <hdegoede@redhat.com>2012-02-20 16:37:22 +0100
commit83d000fdab9666a328e38f0552b749fcde545ad0 (patch)
treeef07a4b277de74d5931fdc1ff06ed2953e332c0e /server/red_channel.h
parentda66d784e25e115043b72c37ea580aaa6a7e0315 (diff)
downloadspice-83d000fdab9666a328e38f0552b749fcde545ad0.tar.gz
spice-83d000fdab9666a328e38f0552b749fcde545ad0.tar.xz
spice-83d000fdab9666a328e38f0552b749fcde545ad0.zip
server/spicevmc: Don't destroy the rcc twice
spicevmc calls red_channel_client_destroy() on the rcc when it disconnects since we don't want to delay the destroy until the session gets closed as spicevmc channels can be opened, closed and opened again during a single session. This causes red_channel_client_destroy() to get called twice, triggering an assert, when a connected channel gets destroyed. This was fixed with commit ffc4de01e6f9ea0676f17b10e45a137d7e15d6ac for the case where: a spicevmc channel was open on client disconnected, and the main channel disconnect gets handled first. But the channel can also be destroyed when the chardev gets unregistered with the spice-server. This path still triggers the assert. This patch fixes this by adding a destroying flag to the rcc struct, and also moves the previous fix over to the same, more clean, method of detecting this special case. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'server/red_channel.h')
-rw-r--r--server/red_channel.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/server/red_channel.h b/server/red_channel.h
index 045bfd43..543aec18 100644
--- a/server/red_channel.h
+++ b/server/red_channel.h
@@ -255,6 +255,7 @@ struct RedChannelClient {
RedChannelCapabilities remote_caps;
int is_mini_header;
+ int destroying;
};
struct RedChannel {