Quote the hostname in the `unable to connect' box so that if the
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 16 Apr 2001 16:19:30 +0000 (16:19 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 16 Apr 2001 16:19:30 +0000 (16:19 +0000)
user starts up N PuTTYs at once and one reports failure, they know
which one.

git-svn-id: svn://svn.tartarus.org/sgt/putty@1051 cda61777-01e9-0310-a592-d414129be87e

window.c

index ec27dc8..4c4360c 100644 (file)
--- a/window.c
+++ b/window.c
@@ -444,7 +444,9 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) {
 
        error = back->init (cfg.host, cfg.port, &realhost);
        if (error) {
-           sprintf(msg, "Unable to open connection:\n%s", error);
+           sprintf(msg, "Unable to open connection to\n"
+                   "%.800s\n"
+                   "%s", cfg.host, error);
            MessageBox(NULL, msg, "PuTTY Error", MB_ICONERROR | MB_OK);
            return 0;
        }