[Spice-devel] [PATCH spice-gtk 7/9] channel: set c->has_error to finish coroutine

Marc-André Lureau marcandre.lureau at redhat.com
Mon Feb 16 09:02:28 PST 2015


It's unnecessary to call channel_disconnect() to finish the coroutine
and disconnect. Use c->has_error instead, like the rest of channel error
code.
---
 gtk/spice-channel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
index a849dde..0d5e5e7 100644
--- a/gtk/spice-channel.c
+++ b/gtk/spice-channel.c
@@ -1763,7 +1763,7 @@ static gboolean spice_channel_recv_link_msg(SpiceChannel *channel)
     return TRUE;
 
 error:
-    SPICE_CHANNEL_GET_CLASS(channel)->channel_disconnect(channel);
+    c->has_error = TRUE;
     c->event = SPICE_CHANNEL_ERROR_LINK;
     return FALSE;
 }
-- 
2.1.0



More information about the Spice-devel mailing list