Patch by ILEoo to make the telnet interface work with "telnet" again (on linux)....
authorAntoine Cellerier <dionoea@videolan.org>
Sun, 25 Feb 2007 19:39:59 +0000 (19:39 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Sun, 25 Feb 2007 19:39:59 +0000 (19:39 +0000)
modules/control/telnet.c

index 86af294..68344ad 100644 (file)
@@ -379,7 +379,7 @@ static void Run( intf_thread_t *p_intf )
                                    cl->i_mode + 2 );
                 }
 
                                    cl->i_mode + 2 );
                 }
 
-                if( i_recv <= 0 )
+                if( i_recv == 0  || ( i_recv == -1 &&  errno != EAGAIN && errno != 0 ) )
                 {
                     net_Close( cl->fd );
                     TAB_REMOVE( p_intf->p_sys->i_clients ,
                 {
                     net_Close( cl->fd );
                     TAB_REMOVE( p_intf->p_sys->i_clients ,