source:
npl/system/netkit-ftp/patches/09-netkit-ftp-0.17-vsftp165083.patch
@
c9755c3
Last change on this file since c9755c3 was c5c522c, checked in by , 8 years ago | |
---|---|
|
|
File size: 1.3 KB |
-
netkit-ftp-0.17/ftp/ftp.c
old new 582 582 volatile long long bytes = 0, hashbytes = HASHBYTES; 583 583 char buf[BUFSIZ], *bufp; 584 584 const char *volatile lmode; 585 int old_code_l; 585 586 586 587 if (verbose && printnames) { 587 588 if (local && *local != '-') … … 799 800 (void) fclose(dout); 800 801 /* closes data as well, so discard it */ 801 802 data = -1; 802 (void) getreply(0); 803 old_code_l = code; 804 (void) getreply(0); 805 806 /* Following "if" will avoid a bug #165083 in ftp-server */ 807 /* It can be later removed. */ 808 if (old_code_l == 150 && code == 150 && cpend == 1 809 && sunique == 1 && cin != NULL && fileno (cin) >= 0 ) { 810 #include <sys/poll.h> 811 struct pollfd fds_events_l [2] ; 812 int rc; 813 814 fds_events_l [0] .fd = fileno (cin); 815 fds_events_l [0] .events = POLLIN | POLLERR | POLLHUP; 816 817 rc = poll (fds_events_l, 1, 5000); 818 switch (rc) { 819 case 1: 820 (void) getreply (0); 821 break; 822 case 0: 823 fprintf (stderr, "ftp: no answer from ftp-server " 824 "(more than 5 sec).\n"); 825 break; 826 case -1: 827 perror("ftp: poll"); 828 break; 829 } 830 } 831 803 832 (void) signal(SIGINT, oldintr); 804 833 if (oldintp) 805 834 (void) signal(SIGPIPE, oldintp);
Note: See TracBrowser
for help on using the repository browser.