]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Half of Lars Gunnarsson's iXplorer compatibility patch: the PSFTP
authorSimon Tatham <anakin@pobox.com>
Sun, 3 Nov 2002 08:46:35 +0000 (08:46 +0000)
committerSimon Tatham <anakin@pobox.com>
Sun, 3 Nov 2002 08:46:35 +0000 (08:46 +0000)
login prompt should be fflushed (presumably fgets fails to implicitly
do this when stdin and stdout are redirected weirdly).

[originally from svn r2186]

psftp.c

diff --git a/psftp.c b/psftp.c
index e5857321629658744a2a4d0eaf617e9a38bab366..93fa33f6d7642a6253fa3855c13ae442f1292c71 100644 (file)
--- a/psftp.c
+++ b/psftp.c
@@ -1769,6 +1769,7 @@ static int psftp_connect(char *userhost, char *user, int portnumber)
     }
     if (!cfg.username[0]) {
        printf("login as: ");
+       fflush(stdout);
        if (!fgets(cfg.username, sizeof(cfg.username), stdin)) {
            fprintf(stderr, "psftp: aborting\n");
            cleanup_exit(1);