[PATCH spice-server] reds: Remove stream watch handling link in a single place

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 server/reds.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/server/reds.c b/server/reds.c
index 9102c5122..66f24c72e 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -1791,7 +1791,6 @@ static void reds_handle_main_link(RedsState *reds, RedLinkInfo *link)
 
     reds_info_new_channel(link, connection_id);
     stream = link->stream;
-    red_stream_remove_watch(stream);
     link->stream = NULL;
     link->link_mess = NULL;
     reds_link_free(link);
@@ -1993,7 +1992,6 @@ static void reds_handle_other_links(RedsState *reds, RedLinkInfo *link)
 
     reds_send_link_result(link, SPICE_LINK_ERR_OK);
     reds_info_new_channel(link, link_mess->connection_id);
-    red_stream_remove_watch(link->stream);
 
     mig_client = reds_mig_target_client_find(reds, client);
     /*
@@ -2021,6 +2019,7 @@ static void reds_handle_other_links(RedsState *reds, RedLinkInfo *link)
 
 static void reds_handle_link(RedsState *reds, RedLinkInfo *link)
 {
+    red_stream_remove_watch(link->stream);
     if (link->link_mess->channel_type == SPICE_CHANNEL_MAIN) {
         reds_handle_main_link(reds, link);
     } else {
-- 
2.14.3

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]