]> granicus.if.org Git - php/commitdiff
added missing "addr.sin_family = AF_INET" to socket routines
authorAndrew Skalski <askalski@php.net>
Tue, 21 Sep 1999 23:34:45 +0000 (23:34 +0000)
committerAndrew Skalski <askalski@php.net>
Tue, 21 Sep 1999 23:34:45 +0000 (23:34 +0000)
ext/ftp/ftp.c

index 502022ad24aab0159e7576d3c1ff42df21503663..f8047408ca42f58b7ee58e07d79a1a64ce29c87b 100644 (file)
@@ -78,6 +78,7 @@ ftp_open(const char *host, short port)
 
        memset(&addr, 0, sizeof(addr));
        memcpy(&addr.sin_addr, he->h_addr, he->h_length);
+       addr.sin_family = AF_INET;
        addr.sin_port = port ? port : htons(21);
 
 
@@ -550,6 +551,7 @@ ftp_port(ftpbuf_t *ftp)
 
        /* bind to a local address */
        memset(&addr, 0, sizeof(addr));
+       addr.sin_family = AF_INET;
        addr.sin_addr.s_addr = INADDR_ANY;
        addr.sin_port = 0;