Wez Furlong's patch to add xterm mouse reporting and proper mouse
[u/mdw/putty] / scp.c
diff --git a/scp.c b/scp.c
index 2d02191..413cf4c 100644 (file)
--- a/scp.c
+++ b/scp.c
@@ -134,12 +134,14 @@ void verify_ssh_host_key(char *host, int port, char *keytype,
         return;
     if (ret == 2) {                    /* key was different */
         fprintf(stderr, wrongmsg, fingerprint);
+       fflush(stderr);
         if (fgets(line, sizeof(line), stdin) &&
             line[0] != '\0' && line[0] != '\n') {
             if (line[0] == 'y' || line[0] == 'Y')
                 store_host_key(host, port, keytype, keystr);
         } else {
             fprintf(stderr, abandoned);
+           fflush(stderr);
             exit(0);
         }
     }
@@ -614,6 +616,7 @@ static void run_err(const char *fmt, ...)
     strcpy(str, "scp: ");
     vsprintf(str+strlen(str), fmt, ap);
     strcat(str, "\n");
+    back->send("\001", 1);            /* scp protocol error prefix */
     back->send(str, strlen(str));
     tell_user(stderr, "%s",str);
     va_end(ap);