[Spice-devel] [PATCH 0.8 8/9] server: ignore SPICE_MSGC_MAIN_AGENT_START messages when there is no agent

Hans de Goede hdegoede at redhat.com
Fri Apr 1 08:13:08 PDT 2011


This can happen for example when a SPICE_MSGC_MAIN_AGENT_START message
from the client and the vdagent disconnecting race.
---
 server/reds.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/server/reds.c b/server/reds.c
index 05f52a0..b349d77 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -1694,7 +1694,7 @@ static void reds_main_handle_message(void *opaque, size_t size, uint32_t type, v
     switch (type) {
     case SPICE_MSGC_MAIN_AGENT_START:
         red_printf("agent start");
-        if (!reds->peer) {
+        if (!reds->peer || !vdagent) {
             return;
         }
         reds->agent_state.write_filter.discard_all = FALSE;
-- 
1.7.4.2



More information about the Spice-devel mailing list