[PATCH spice-gtk] channel: reset c->has_error when connected

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

 



Whenever the channel socket is connected, c->has_error should be reset.
Until now, only the regular open_host() case was reset, but client
client provided fd must also reset the error state.

It should be safe to move it after the "connected" label, since the
ssl code doesn't need c->has_error.

https://bugzilla.redhat.com/show_bug.cgi?id=1211063
---
 gtk/spice-channel.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
index 95eb615..12d61ee 100644
--- a/gtk/spice-channel.c
+++ b/gtk/spice-channel.c
@@ -2331,8 +2331,6 @@ reconnect:
     }
     c->sock = g_object_ref(g_socket_connection_get_socket(c->conn));
 
-    c->has_error = FALSE;
-
     if (c->tls) {
         c->ctx = SSL_CTX_new(SSLv23_method());
         if (c->ctx == NULL) {
@@ -2407,6 +2405,7 @@ ssl_reconnect:
     }
 
 connected:
+    c->has_error = FALSE;
     c->in = g_io_stream_get_input_stream(G_IO_STREAM(c->conn));
     c->out = g_io_stream_get_output_stream(G_IO_STREAM(c->conn));
 
-- 
2.1.0

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://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]