]> git.sesse.net Git - vlc/commitdiff
Use VLC networking APIs: close -> net_Close, accept -> net_Accept
authorRémi Denis-Courmont <rem@videolan.org>
Sun, 25 Jul 2004 17:47:05 +0000 (17:47 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sun, 25 Jul 2004 17:47:05 +0000 (17:47 +0000)
modules/control/telnet.c

index 611d8acfd4966666a1dee4717db6a51aea76dc79..e1e76fe33d4a647d199b8503704fba6af42b8424 100644 (file)
 
 #include "vlc_vlm.h"
 
-#if defined( WIN32 ) || defined( UNDER_CE )
-#define SOCKET_CLOSE(a)    closesocket(a)
-#else
-#define SOCKET_CLOSE(a)    close(a)
-#endif
-
 #define READ_MODE_PWD 1
 #define READ_MODE_CMD 2
 #define WRITE_MODE_PWD 3 // when we write the word "Password:"
@@ -210,7 +204,7 @@ static void Run( intf_thread_t *p_intf )
         int             i;
 
         /* if a new client wants to communicate */
-        fd = accept( p_sys->fd, NULL, NULL );
+        fd = net_Accept( p_intf, p_sys->fd, 0 );
         if( fd > 0 )
         {
             telnet_client_t *cl;
@@ -371,7 +365,7 @@ static void Run( intf_thread_t *p_intf )
                     !strncmp( cl->buffer_read, "quit", 4 )  ||
                     !strncmp( cl->buffer_read, "exit", 4 ) )
                 {
-                    close( cl->fd );
+                    net_Close( cl->fd );
                     TAB_REMOVE( p_intf->p_sys->i_clients , p_intf->p_sys->clients , cl );
                     free( cl );
                 }