]> git.sesse.net Git - vlc/blobdiff - modules/access/ftp.c
Separate socket/resolv stuff (network.h) from url stuff (vlc_url.h)
[vlc] / modules / access / ftp.c
index ccc10ce0cbff24c2ed41e0a5f67d8bcf1cd883df..246ebe8e6de0c84c376ebc1dc30a88e1ab6e22f5 100644 (file)
@@ -5,7 +5,7 @@
  * $Id$
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr> - original code
- *          Rémi Denis-Courmont <rem # videolan.org> - EPSV support
+ *          Rémi Denis-Courmont <rem # videolan.org> - EPSV support
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /*****************************************************************************
 #include <vlc/input.h>
 
 #include "network.h"
-#if defined( UNDER_CE )
-#   include <winsock.h>
-#elif defined( WIN32 )
-#   include <winsock2.h>
-#else
-#   include <sys/socket.h>
-#endif
+#include "vlc_url.h"
 
 /*****************************************************************************
  * Module descriptor
@@ -106,7 +100,7 @@ static int Connect( access_t *p_access, access_sys_t *p_sys )
 
     /* *** Open a TCP connection with server *** */
     msg_Dbg( p_access, "waiting for connection..." );
-    p_sys->fd_cmd = fd = net_OpenTCP( p_access, p_sys->url.psz_host,
+    p_sys->fd_cmd = fd = net_ConnectTCP( p_access, p_sys->url.psz_host,
                                       p_sys->url.i_port );
     if( fd < 0 )
     {
@@ -617,7 +611,7 @@ static int ftp_StartStream( access_t *p_access, off_t i_start )
     }
 
     msg_Dbg( p_access, "waiting for data connection..." );
-    p_sys->fd_data = net_OpenTCP( p_access, psz_ip, i_port );
+    p_sys->fd_data = net_ConnectTCP( p_access, psz_ip, i_port );
     if( p_sys->fd_data < 0 )
     {
         msg_Err( p_access, "failed to connect with server" );