[FTP]
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 1 Mar 2014 22:42:38 +0000 (22:42 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 1 Mar 2014 22:42:38 +0000 (22:42 +0000)
Fix download with ftp.exe, the problem was that we didn't switch download mode to binary when needed, because of idiotic defines used that where pointless here. We have this bug since revision 12776...
Patch by Alexander Varnin, see CORE-3682 for details.
CORE-3682 #resolve #comment Committed in revision, cheers ;)

svn path=/trunk/; revision=62372

reactos/base/applications/network/ftp/cmds.c

index 4b9c08d..dd752ec 100644 (file)
@@ -85,18 +85,11 @@ void setpeer(int argc, const char *argv[])
        }
        host = hookup(argv[1], portnum);
        if (host) {
-#if defined(unix) && NBBY == 8
                int overbose;
-#endif
                connected = 1;
                if (autologin)
                        (void) login(argv[1]);
 
-#if defined(unix) && NBBY == 8
-/*
- * this ifdef is to keep someone form "porting" this to an incompatible
- * system and not checking this out. This way they have to think about it.
- */
                overbose = verbose;
                if (debug == 0)
                        verbose = -1;
@@ -119,7 +112,7 @@ void setpeer(int argc, const char *argv[])
                                *cp = c;
                }
                if (!strncmp(reply_string, "215 UNIX Type: L8", 17)) {
-                       setbinary();
+                       setbinary(0, NULL);
                        /* allbinary = 1; this violates the RFC */
                        if (overbose)
                            printf("Using %s mode to transfer files.\n",
@@ -130,7 +123,6 @@ void setpeer(int argc, const char *argv[])
 "Remember to set tenex mode when transfering binary files from this machine.\n");
                }
                verbose = overbose;
-#endif /* unix */
        }
        (void) fflush(stdout);
 }