[Spice-devel] [PATCH] Reset char device when agent is disconnected
Frediano Ziglio
fziglio at redhat.com
Wed Jun 1 12:51:28 UTC 2016
Before commit 1cec1c5118b65124de6bc6f984f376ff4e297bfb
("reds: Make VDIPortState a GObject") char device was entirely destroyed.
After nothing happens to the device leaving all possible pending
data. Do a soft reset to avoid a possible regression.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
server/reds.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/server/reds.c b/server/reds.c
index 827ba2a..1728e73 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -554,12 +554,8 @@ static void reds_reset_vdp(RedsState *reds)
* In addition, there used to be a misshandling of AGENT_TOKENS message in spice-gtk: it
* overrides the amount of tokens, instead of adding the given amount.
*/
- if (red_channel_test_remote_cap(&reds->main_channel->base,
- SPICE_MAIN_CAP_AGENT_CONNECTED_TOKENS)) {
- dev->priv->agent_attached = FALSE;
- } else {
- red_char_device_reset(RED_CHAR_DEVICE(dev));
- }
+ dev->priv->agent_attached = FALSE;
+ red_char_device_reset(RED_CHAR_DEVICE(dev));
sif = spice_char_device_get_interface(reds->vdagent);
if (sif->state) {
--
2.7.4
More information about the Spice-devel
mailing list