]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Call console_provide_logctx _before_ initialising the back end, so
authorSimon Tatham <anakin@pobox.com>
Sun, 27 Aug 2006 08:34:04 +0000 (08:34 +0000)
committerSimon Tatham <anakin@pobox.com>
Sun, 27 Aug 2006 08:34:04 +0000 (08:34 +0000)
that logevent() will go to stderr in -v mode even during the back
end init function.

[originally from svn r6811]

windows/winplink.c

index 16351ae9d774de3c3bce1ce539833fc5ccca42f2..c85a6075e6c6d261a1eb2ff72f4c9402087d1fe5 100644 (file)
@@ -536,6 +536,9 @@ int main(int argc, char **argv)
        return 1;
     }
 
+    logctx = log_init(NULL, &cfg);
+    console_provide_logctx(logctx);
+
     /*
      * Start up the connection.
      */
@@ -553,9 +556,7 @@ int main(int argc, char **argv)
            fprintf(stderr, "Unable to open connection:\n%s", error);
            return 1;
        }
-       logctx = log_init(NULL, &cfg);
        back->provide_logctx(backhandle, logctx);
-       console_provide_logctx(logctx);
        sfree(realhost);
     }
     connopen = 1;