[Spice-devel] [PATCH spice-gtk] channel: reset c->has_error when connected
Marc-André Lureau
marcandre.lureau at redhat.com
Mon Apr 13 05:49:27 PDT 2015
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
More information about the Spice-devel
mailing list