First attempt at a Unix port of Plink. Seems to basically work;
[u/mdw/putty] / psftp.c
diff --git a/psftp.c b/psftp.c
index a278260..e585732 100644 (file)
--- a/psftp.c
+++ b/psftp.c
@@ -32,6 +32,8 @@ static int do_sftp_init(void);
  */
 
 char *pwd, *homedir;
+static Backend *back;
+static void *backhandle;
 
 /* ----------------------------------------------------------------------
  * Higher-level helper functions used in commands.
@@ -1470,7 +1472,7 @@ void modalfatalbox(char *fmt, ...)
 
     cleanup_exit(1);
 }
-void connection_fatal(char *fmt, ...)
+void connection_fatal(void *frontend, char *fmt, ...)
 {
     char str[0x100];                  /* Make the size big enough */
     va_list ap;
@@ -1484,7 +1486,7 @@ void connection_fatal(char *fmt, ...)
     cleanup_exit(1);
 }
 
-void ldisc_send(char *buf, int len, int interactive)
+void ldisc_send(void *handle, char *buf, int len, int interactive)
 {
     /*
      * This is only here because of the calls to ldisc_send(NULL,
@@ -1827,6 +1829,8 @@ static int psftp_connect(char *userhost, char *user, int portnumber)
        fprintf(stderr, "ssh_init: %s\n", err);
        return 1;
     }
+    logctx = log_init(NULL);
+    back->provide_logctx(backhandle, logctx);
     ssh_sftp_init();
     if (verbose && realhost != NULL)
        printf("Connected to %s\n", realhost);