From 37e13ea2d0c0df564f00278ac68bf8a1e584bfd9 Mon Sep 17 00:00:00 2001 From: Judd Vinet Date: Fri, 11 Apr 2003 16:58:50 +0000 Subject: Imported from pacman-2.4.tar.gz --- src/pacsync.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/pacsync.c') diff --git a/src/pacsync.c b/src/pacsync.c index 72b0a0d4..fce3a29b 100644 --- a/src/pacsync.c +++ b/src/pacsync.c @@ -42,6 +42,7 @@ static int offset; /* pacman options */ extern char *pmo_root; +extern unsigned char pmo_nopassiveftp; /* sync servers */ extern PMList *pmc_syncs; @@ -150,10 +151,12 @@ int downloadfiles(PMList *servers, char *localpath, PMList *files) sync_fnm[24] = '\0'; if(!server->islocal) { - /* passive mode */ - /* TODO: make passive ftp an option */ - if(!FtpOptions(FTPLIB_CONNMODE, FTPLIB_PASSIVE, control)) { - fprintf(stderr, "warning: failed to set passive mode\n"); + if(!pmo_nopassiveftp) { + if(!FtpOptions(FTPLIB_CONNMODE, FTPLIB_PASSIVE, control)) { + fprintf(stderr, "warning: failed to set passive mode\n"); + } + } else { + vprint("FTP passive mode not set\n"); } if(!FtpSize(fn, &fsz, FTPLIB_IMAGE, control)) { fprintf(stderr, "warning: failed to get filesize for %s\n", fn); -- cgit v1.2.3-24-g4f1b