Consequences of Simon's recent deglobalisation changes.
[u/mdw/putty] / mac / macterm.c
index 014260c..ff59e55 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: macterm.c,v 1.41 2003/01/12 13:50:04 ben Exp $ */
+/* $Id: macterm.c,v 1.44 2003/01/12 16:11:27 ben Exp $ */
 /*
  * Copyright (c) 1999 Simon Tatham
  * Copyright (c) 1999, 2002 Ben Harris
@@ -169,12 +169,13 @@ void mac_startsession(Session *s)
        ActivatePalette(s->window);
     }
 
-    s->logctx = log_init(s);
+    s->logctx = log_init(s, &s->cfg);
     term_provide_logctx(s->term, s->logctx);
 
-    errmsg = s->back->init(s->term, &s->backhandle, s->cfg.host, s->cfg.port,
-                 &s->realhost, s->cfg.tcp_nodelay);
-    fatalbox("%s", errmsg);
+    errmsg = s->back->init(s->term, &s->backhandle, &s->cfg, s->cfg.host,
+                          s->cfg.port, &s->realhost, s->cfg.tcp_nodelay);
+    if (errmsg != NULL)
+       fatalbox("%s", errmsg);
     s->back->provide_logctx(s->backhandle, s->logctx);
 
     term_provide_resize_fn(s->term, s->back->size, s->backhandle);
@@ -188,7 +189,7 @@ void mac_startsession(Session *s)
     ShowWindow(s->window);
     s->next = sesslist;
     s->prev = s->next->prev;
-    if (ret->next != NULL)
+    if (s->next != NULL)
        s->next->prev = &s->next;
     sesslist = s;
 }