source: npl/system/netkit-ftp/patches/11-netkit-ftp-0.17-data.patch @ 2154c77

Last change on this file since 2154c77 was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100644
File size: 531 bytes
RevLine 
[c5c522c]1--- netkit-ftp-0.17/ftp/ftp.c.data      2005-12-02 15:31:27.000000000 +0100
2+++ netkit-ftp-0.17/ftp/ftp.c   2005-12-02 15:35:46.000000000 +0100
3@@ -1223,6 +1223,7 @@
4 static int
5 initconn(void)
6 {
7+       int rc;
8        u_char *p, *a;
9        int result, tmpno = 0;
10        socklen_t len;
11@@ -1240,6 +1241,13 @@
12        }
13 #endif
14        if (passivemode) {
15+               if (data >= 0){
16+                       rc = close (data);
17+                       data = -1;
18+                       if (rc == -1){
19+                               perror ("ftp: close");
20+                       }
21+               }
22                data_addr = hisctladdr;
23                data = socket(data_addr.su_family, SOCK_STREAM, 0);
24                if (data < 0) {
Note: See TracBrowser for help on using the repository browser.