Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/unix
diff options
context:
space:
mode:
authorJacob Nevins <jacobn@chiark.greenend.org.uk>2022-05-24 15:32:55 +0300
committerJacob Nevins <jacobn@chiark.greenend.org.uk>2022-05-24 15:32:55 +0300
commitc5d837c14a0f5c7a9a96b32454a5b92bc1358f48 (patch)
treec18efc783495e0022c4da7b09c2a35dd8ccf6e46 /unix
parent56458a14914c210c907e1025da53685a2864dd03 (diff)
Special backend init error handling for pterm.
Fixes a cosmetic issue where the new ConPTY error added in 4ae8b742ab had an ugly "Unable to open connection to". (Arguably this ought to test a backend property rather than cmdline_tooltype.)
Diffstat (limited to 'unix')
-rw-r--r--unix/window.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/unix/window.c b/unix/window.c
index f4a50007..811ffc17 100644
--- a/unix/window.c
+++ b/unix/window.c
@@ -5165,9 +5165,16 @@ static void start_backend(GtkFrontend *inst)
conf_get_bool(inst->conf, CONF_tcp_keepalives));
if (error) {
- seat_connection_fatal(&inst->seat,
- "Unable to open connection to %s:\n%s",
- conf_dest(inst->conf), error);
+ if (cmdline_tooltype & TOOLTYPE_NONNETWORK) {
+ /* Special case for pterm. */
+ seat_connection_fatal(&inst->seat,
+ "Unable to open terminal:\n%s",
+ error);
+ } else {
+ seat_connection_fatal(&inst->seat,
+ "Unable to open connection to %s:\n%s",
+ conf_dest(inst->conf), error);
+ }
sfree(error);
inst->exited = true;
return;