Having laid all the groundwork, we can now remove the global `cfg'
[u/mdw/putty] / unix / uxplink.c
index 5ca5bb2..eda68d2 100644 (file)
@@ -72,6 +72,7 @@ struct termios orig_termios;
 
 static Backend *back;
 static void *backhandle;
+static Config cfg;
 
 /*
  * Default settings that are specific to pterm.
@@ -544,14 +545,14 @@ int main(int argc, char **argv)
     /*
      * Start up the connection.
      */
-    logctx = log_init(NULL);
+    logctx = log_init(NULL, &cfg);
     {
        char *error;
        char *realhost;
        /* nodelay is only useful if stdin is a terminal device */
        int nodelay = cfg.tcp_nodelay && isatty(0);
 
-       error = back->init(NULL, &backhandle, cfg.host, cfg.port,
+       error = back->init(NULL, &backhandle, &cfg, cfg.host, cfg.port,
                           &realhost, nodelay);
        if (error) {
            fprintf(stderr, "Unable to open connection:\n%s\n", error);