Oops, Ben is quite right about the rather appalling design of
[u/mdw/putty] / plink.c
diff --git a/plink.c b/plink.c
index 2ed3e03..b1bebf9 100644 (file)
--- a/plink.c
+++ b/plink.c
@@ -69,6 +69,7 @@ WSAEVENT netevent;
 
 static Backend *back;
 static void *backhandle;
+static Config cfg;
 
 int term_ldisc(Terminal *term, int mode)
 {
@@ -165,7 +166,8 @@ void try_output(int is_stderr)
     }
 }
 
-int from_backend(void *frontend_handle, int is_stderr, char *data, int len)
+int from_backend(void *frontend_handle, int is_stderr,
+                const char *data, int len)
 {
     int osize, esize;
 
@@ -547,6 +549,7 @@ int main(int argc, char **argv)
        }
        logctx = log_init(NULL, &cfg);
        back->provide_logctx(backhandle, logctx);
+       console_provide_logctx(logctx);
        sfree(realhost);
     }
     connopen = 1;