From d31441182ca7de15dc681beea2fc228b98d44b75 Mon Sep 17 00:00:00 2001 From: Antoine Cellerier Date: Sun, 25 Feb 2007 19:39:59 +0000 Subject: [PATCH] Patch by ILEoo to make the telnet interface work with "telnet" again (on linux). Looks ok according to the recv(2) manpage. Please fix if this is flawed. --- modules/control/telnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/control/telnet.c b/modules/control/telnet.c index 86af294b4d..68344ad8b8 100644 --- a/modules/control/telnet.c +++ b/modules/control/telnet.c @@ -379,7 +379,7 @@ static void Run( intf_thread_t *p_intf ) 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 , -- 2.20.1