[Spice-devel] [PATCH 08/15] Change reds_agent_remove() to take RedsState arg

Frediano Ziglio fziglio at redhat.com
Thu Jan 14 06:33:19 PST 2016


From: Jonathon Jongsma <jjongsma at redhat.com>

---
 server/reds.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/server/reds.c b/server/reds.c
index 9089dda..c3df9df 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -636,7 +636,7 @@ static void reds_update_mouse_mode(RedsState *reds)
     }
 }
 
-static void reds_agent_remove(void)
+static void reds_agent_remove(RedsState *reds)
 {
     // TODO: agent is broken with multiple clients. also need to figure out what to do when
     // part of the clients are during target migration.
@@ -677,7 +677,7 @@ static int vdi_port_read_buf_process(int port, VDIReadBuf *buf)
         case AGENT_MSG_FILTER_DISCARD:
             return FALSE;
         case AGENT_MSG_FILTER_PROTO_ERROR:
-            reds_agent_remove();
+            reds_agent_remove(reds);
             return FALSE;
         }
     }
@@ -685,7 +685,7 @@ static int vdi_port_read_buf_process(int port, VDIReadBuf *buf)
         return FALSE;
     default:
         spice_warning("invalid port");
-        reds_agent_remove();
+        reds_agent_remove(reds);
         return FALSE;
     }
 }
@@ -3169,7 +3169,7 @@ static void spice_server_char_device_remove_interface(SpiceBaseInstance *sin)
     spice_info("remove CHAR_DEVICE %s", char_device->subtype);
     if (strcmp(char_device->subtype, SUBTYPE_VDAGENT) == 0) {
         if (vdagent) {
-            reds_agent_remove();
+            reds_agent_remove(reds);
         }
     }
 #ifdef USE_SMARTCARD
-- 
2.4.3



More information about the Spice-devel mailing list