]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Misc bugfixes
authorSimon Tatham <anakin@pobox.com>
Fri, 27 Oct 2000 09:17:19 +0000 (09:17 +0000)
committerSimon Tatham <anakin@pobox.com>
Fri, 27 Oct 2000 09:17:19 +0000 (09:17 +0000)
[originally from svn r771]

scp.c
ssh.c

diff --git a/scp.c b/scp.c
index b831fbbfb7d0db0bbe4d0dd4a7e1798b0acce501..73d574fdfe2ac8310118bf32b6a2830555f9129a 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 6f8e3260c9fe85d15f36e2be5455f77ece44be9d..3eddd7bb3d2e3a23edb35fb64bf022c87cec5ddf 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);