From 4f4643dd2fe8b1dbc0db3268ac7716d71c021bbc Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 15 Feb 2017 21:37:59 -0800 Subject: [PATCH] GUACAMOLE-208: Report network failures to connect with UPSTREAM_NOT_FOUND. --- src/common-ssh/guac_ssh.c | 2 +- src/protocols/telnet/telnet.c | 3 ++- src/protocols/vnc/vnc.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/common-ssh/guac_ssh.c b/src/common-ssh/guac_ssh.c index 488eea24..97d3bbcd 100644 --- a/src/common-ssh/guac_ssh.c +++ b/src/common-ssh/guac_ssh.c @@ -483,7 +483,7 @@ guac_common_ssh_session* guac_common_ssh_create_session(guac_client* client, /* If unable to connect to anything, fail */ if (current_address == NULL) { - guac_client_abort(client, GUAC_PROTOCOL_STATUS_UPSTREAM_ERROR, + guac_client_abort(client, GUAC_PROTOCOL_STATUS_UPSTREAM_NOT_FOUND, "Unable to connect to any addresses."); close(fd); return NULL; diff --git a/src/protocols/telnet/telnet.c b/src/protocols/telnet/telnet.c index b80c959e..56661a43 100644 --- a/src/protocols/telnet/telnet.c +++ b/src/protocols/telnet/telnet.c @@ -352,7 +352,8 @@ static telnet_t* __guac_telnet_create_session(guac_client* client) { /* If unable to connect to anything, fail */ if (current_address == NULL) { - guac_client_abort(client, GUAC_PROTOCOL_STATUS_UPSTREAM_ERROR, "Unable to connect to any addresses."); + guac_client_abort(client, GUAC_PROTOCOL_STATUS_UPSTREAM_NOT_FOUND, + "Unable to connect to any addresses."); return NULL; } diff --git a/src/protocols/vnc/vnc.c b/src/protocols/vnc/vnc.c index 9b0bd769..611c84f4 100644 --- a/src/protocols/vnc/vnc.c +++ b/src/protocols/vnc/vnc.c @@ -202,7 +202,8 @@ void* guac_vnc_client_thread(void* data) { /* If the final connect attempt fails, return error */ if (!rfb_client) { - guac_client_abort(client, GUAC_PROTOCOL_STATUS_UPSTREAM_ERROR, "Unable to connect to VNC server."); + guac_client_abort(client, GUAC_PROTOCOL_STATUS_UPSTREAM_NOT_FOUND, + "Unable to connect to VNC server."); return NULL; }