- Reflect `gateport' variable type change.
- Make it compile with -Wall. PR: 18619 Submitted by: David Malone <dwmalone@maths.tcd.ie> Reviewed by: ru
This commit is contained in:
parent
39610c7229
commit
00eea183e1
@ -657,8 +657,8 @@ status(argc, argv)
|
||||
}
|
||||
pswitch(0);
|
||||
}
|
||||
printf("Gate ftp: %s, server %s, port %d.\n", onoff(gatemode),
|
||||
*gateserver ? gateserver : "(none)", ntohs(gateport));
|
||||
printf("Gate ftp: %s, server %s, port %s.\n", onoff(gatemode),
|
||||
*gateserver ? gateserver : "(none)", gateport);
|
||||
printf("Passive mode: %s.\n", onoff(passivemode));
|
||||
printf("Mode: %s; Type: %s; Form: %s; Structure: %s.\n",
|
||||
modename, typename, formname, structname);
|
||||
@ -889,7 +889,9 @@ setgate(argc, argv)
|
||||
code = -1;
|
||||
return;
|
||||
}
|
||||
gateport = htons(port);
|
||||
if (gateport != NULL)
|
||||
free(gateport);
|
||||
asprintf(&gateport, "%ld", port);
|
||||
}
|
||||
strncpy(gsbuf, argv[1], sizeof(gsbuf) - 1);
|
||||
gsbuf[sizeof(gsbuf) - 1] = '\0';
|
||||
@ -902,8 +904,8 @@ setgate(argc, argv)
|
||||
"Disabling gate-ftp mode - no gate-ftp server defined.\n");
|
||||
gatemode = 0;
|
||||
} else {
|
||||
printf("Gate ftp: %s, server %s, port %d.\n", onoff(gatemode),
|
||||
*gateserver ? gateserver : "(none)", ntohs(gateport));
|
||||
printf("Gate ftp: %s, server %s, port %s.\n", onoff(gatemode),
|
||||
*gateserver ? gateserver : "(none)", gateport);
|
||||
}
|
||||
code = gatemode;
|
||||
}
|
||||
|
@ -114,10 +114,12 @@ url_get(origline, proxyenv)
|
||||
s = -1;
|
||||
proxy = NULL;
|
||||
isftpurl = 0;
|
||||
res0 = NULL;
|
||||
|
||||
#ifdef __GNUC__ /* XXX: to shut up gcc warnings */
|
||||
(void)&savefile;
|
||||
(void)&proxy;
|
||||
(void)&res0;
|
||||
#endif
|
||||
|
||||
line = strdup(origline);
|
||||
|
@ -1178,6 +1178,9 @@ initconn()
|
||||
#endif
|
||||
|
||||
if (passivemode) {
|
||||
#ifdef __GNUC__ /* XXX: to shut up gcc warnings */
|
||||
(void)&pasvcmd;
|
||||
#endif
|
||||
data_addr = myctladdr;
|
||||
data = socket(data_addr.su_family, SOCK_STREAM, 0);
|
||||
if (data < 0) {
|
||||
@ -1327,7 +1330,6 @@ initconn()
|
||||
}
|
||||
} else if (strcmp(pasvcmd, "EPSV") == 0) {
|
||||
char delim[4];
|
||||
char *tcpport;
|
||||
|
||||
prt[0] = 0;
|
||||
if (code / 10 == 22 && code != 229) {
|
||||
|
@ -45,6 +45,7 @@
|
||||
#include <setjmp.h>
|
||||
#include <stringlist.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
|
||||
#ifndef SMALL
|
||||
#include <histedit.h>
|
||||
|
@ -79,11 +79,9 @@ main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
struct servent *sp;
|
||||
int ch, top, rval;
|
||||
long port;
|
||||
struct passwd *pw = NULL;
|
||||
char *cp, *ep, homedir[MAXPATHLEN], *s;
|
||||
char *cp, homedir[MAXPATHLEN], *s;
|
||||
int dumbterm;
|
||||
char *src_addr = NULL;
|
||||
|
||||
@ -94,9 +92,9 @@ main(argc, argv)
|
||||
gateport = NULL;
|
||||
cp = getenv("FTPSERVERPORT");
|
||||
if (cp != NULL)
|
||||
gateport = cp;
|
||||
asprintf(&gateport, "%s", cp);
|
||||
if (!gateport)
|
||||
gateport = "ftpgate";
|
||||
asprintf(&gateport, "ftpgate");
|
||||
doglob = 1;
|
||||
interactive = 1;
|
||||
autologin = 1;
|
||||
@ -234,7 +232,6 @@ main(argc, argv)
|
||||
if (dobind) {
|
||||
struct addrinfo hints;
|
||||
struct addrinfo *res;
|
||||
char *ftpdataport = "ftp-data";
|
||||
int error;
|
||||
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
|
Loading…
Reference in New Issue
Block a user