[gtk-vnc] Clear error when trying next IP address



commit de29d8be455028b017b1e4f48d43704d14cbb037
Author: Guido Günther <agx sigxcpu org>
Date:   Wed Sep 8 14:30:04 2010 +0100

    Clear error when trying next IP address
    
    If connecting to an IP address fails, the GError must be
    cleared before trying the next address, otherwise the
    error will be overwritten on next failure
    
    * src/vncconnection.c: Clear error when trying next IP addr

 src/vncconnection.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/vncconnection.c b/src/vncconnection.c
index ce2ad97..8a0a6c3 100644
--- a/src/vncconnection.c
+++ b/src/vncconnection.c
@@ -4610,6 +4610,7 @@ static gboolean vnc_connection_open_host_internal(VncConnection *conn)
 	while (!sock &&
 	       (sockaddr = g_socket_address_enumerator_next(enumerator, NULL, &conn_error))) {
 		VNC_DEBUG("Trying one socket");
+		g_clear_error(&conn_error);
 		sock = vnc_connection_connect_socket(sockaddr, &conn_error);
 		g_object_unref(sockaddr);
 	}



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