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