Misc bugfixes
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 27 Oct 2000 09:17:19 +0000 (09:17 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 27 Oct 2000 09:17:19 +0000 (09:17 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/putty@771 cda61777-01e9-0310-a592-d414129be87e

scp.c
ssh.c

diff --git a/scp.c b/scp.c
index b831fbb..73d574f 100644 (file)
--- a/scp.c
+++ b/scp.c
@@ -53,7 +53,6 @@ static int statistics = 1;
 static int portnumber = 0;
 static char *password = NULL;
 static int errs = 0;
-static int connection_open = 0;
 /* GUI Adaptation - Sept 2000 */
 #define NAME_STR_MAX 2048
 static char statname[NAME_STR_MAX+1];
@@ -377,7 +376,7 @@ static void bump(char *fmt, ...)
     strcat(str, "\n");
     tell_str(stderr, str);
 
-    if (connection_open) {
+    if (back->socket() != NULL) {
        char ch;
        back->special(TS_EOF);
        ssh_scp_recv(&ch, 1);
@@ -476,8 +475,6 @@ static void do_cmd(char *host, char *user, char *cmd)
     ssh_scp_init();
     if (verbose && realhost != NULL)
        tell_user(stderr, "Connected to %s\n", realhost);
-
-    connection_open = 1;
 }
 
 /*
@@ -1235,7 +1232,7 @@ int main(int argc, char *argv[])
            tolocal(argc, argv);
     }
 
-    if (connection_open) {
+    if (back->socket() != NULL) {
        char ch;
        back->special(TS_EOF);
        ssh_scp_recv(&ch, 1);
diff --git a/ssh.c b/ssh.c
index 6f8e326..3eddd7b 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -998,7 +998,7 @@ static void ssh_gotdata(unsigned char *data, int datalen)
     crFinishV;
 }
 
-static int ssh_receive(Socket s, int urgent, char *data, int len) {
+static int ssh_receive(Socket skt, int urgent, char *data, int len) {
     if (!len) {
        /* Connection has closed. */
        sk_close(s);