source:
npl/system/netkit-ftp/patches/31-netkit-ftp-0.17-lsn-timeout.patch
Last change on this file was c5c522c, checked in by , 8 years ago | |
---|---|
|
|
File size: 771 bytes |
-
netkit-ftp-0.17/ftp/ftp.c
old new initconn(void) 1245 1245 u_int ad[16], po[2], af, alen, plen; 1246 1246 char *pasvcmd = NULL; 1247 1247 char hbuf[MAXHOSTNAMELEN], pbuf[NI_MAXSERV]; 1248 struct timeval timeout; 1249 1250 timeout.tv_sec = 30; 1251 timeout.tv_usec = 0; 1248 1252 1249 1253 #ifdef INET6 1250 1254 if (myctladdr.su_family == AF_INET6 … … noport: 1486 1490 perror("ftp: setsockopt (reuse address)"); 1487 1491 goto bad; 1488 1492 } 1493 if (setsockopt (data, SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout, 1494 sizeof(timeout)) < 0) { 1495 perror("ftp: setsockopt failed\n"); 1496 } 1489 1497 if (bind(data, (struct sockaddr *)&data_addr, sizeof (data_addr)) < 0) { 1490 1498 perror("ftp: bind"); 1491 1499 goto bad;
Note: See TracBrowser
for help on using the repository browser.