[gtk-vnc] Report a proper error message if hitting connection timeout
- From: Daniel P. Berrange <dberrange src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-vnc] Report a proper error message if hitting connection timeout
- Date: Wed, 12 Apr 2017 10:55:07 +0000 (UTC)
commit 283434730d0cc3a1ee8270e137d71cebe4f0e01b
Author: Daniel P. Berrange <berrange redhat com>
Date: Tue Apr 11 11:06:28 2017 +0100
Report a proper error message if hitting connection timeout
Signed-off-by: Daniel P. Berrange <berrange redhat com>
src/vncconnection.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/vncconnection.c b/src/vncconnection.c
index e5b43a0..2b2bdbb 100644
--- a/src/vncconnection.c
+++ b/src/vncconnection.c
@@ -103,6 +103,8 @@
#endif
+#define GTK_VNC_ERROR g_quark_from_static_string("gtk-vnc")
+
struct wait_queue
{
gboolean waiting;
@@ -5386,6 +5388,7 @@ static GSocket *vnc_connection_connect_socket(struct wait_queue *wait,
*error = NULL;
VNC_DEBUG("Socket pending");
if (!g_io_wait_interruptable(wait, sock, G_IO_OUT|G_IO_ERR|G_IO_HUP)) {
+ g_set_error(error, GTK_VNC_ERROR, 0, "%s", "Connection timed out");
VNC_DEBUG("connect interrupted");
timeout = 0;
goto timeout;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]