Blame SOURCES/0006-Report-a-proper-error-message-if-hitting-connection-.patch

1c1f09
From 3691a5e5fdf7aeab78ad9b038994c1d24063a509 Mon Sep 17 00:00:00 2001
1c1f09
From: "Daniel P. Berrange" <berrange@redhat.com>
1c1f09
Date: Tue, 11 Apr 2017 11:06:28 +0100
1c1f09
Subject: [PATCH] Report a proper error message if hitting connection timeout
1c1f09
1c1f09
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
1c1f09
(cherry picked from commit 283434730d0cc3a1ee8270e137d71cebe4f0e01b)
1c1f09
---
1c1f09
 src/vncconnection.c | 3 +++
1c1f09
 1 file changed, 3 insertions(+)
1c1f09
1c1f09
diff --git a/src/vncconnection.c b/src/vncconnection.c
1c1f09
index e5b43a0..2b2bdbb 100644
1c1f09
--- a/src/vncconnection.c
1c1f09
+++ b/src/vncconnection.c
1c1f09
@@ -103,6 +103,8 @@
1c1f09
 #endif
1c1f09
 
1c1f09
 
1c1f09
+#define GTK_VNC_ERROR g_quark_from_static_string("gtk-vnc")
1c1f09
+
1c1f09
 struct wait_queue
1c1f09
 {
1c1f09
     gboolean waiting;
1c1f09
@@ -5386,6 +5388,7 @@ static GSocket *vnc_connection_connect_socket(struct wait_queue *wait,
1c1f09
             *error = NULL;
1c1f09
             VNC_DEBUG("Socket pending");
1c1f09
             if (!g_io_wait_interruptable(wait, sock, G_IO_OUT|G_IO_ERR|G_IO_HUP)) {
1c1f09
+                g_set_error(error, GTK_VNC_ERROR, 0, "%s", "Connection timed out");
1c1f09
                 VNC_DEBUG("connect interrupted");
1c1f09
                 timeout = 0;
1c1f09
                 goto timeout;