[vlc-devel] commit: Telnet: fix win32 work. (Jean-Baptiste Kempf )

git version control git at videolan.org
Fri Dec 19 01:20:37 CET 2008


vlc | branch: 0.9-bugfix | Jean-Baptiste Kempf <jb at videolan.org> | Fri Dec 19 01:17:05 2008 +0100| [bcca70d787d4ce8ed638a186a2016d5f0201d6e9] | committer: Jean-Baptiste Kempf 

Telnet: fix win32 work.

Code by fpostma on the forum - fpostma __ xs4all | nl
Thanks to Lorni for testing.
Close #2022

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bcca70d787d4ce8ed638a186a2016d5f0201d6e9
---

 modules/control/telnet.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/modules/control/telnet.c b/modules/control/telnet.c
index c271d7e..1ac35f8 100644
--- a/modules/control/telnet.c
+++ b/modules/control/telnet.c
@@ -30,6 +30,10 @@
 # include "config.h"
 #endif
 
+#ifdef WIN32
+# include "winsock2.h"
+#endif
+
 #include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_interface.h>
@@ -371,6 +375,13 @@ static void Run( intf_thread_t *p_intf )
                                    cl->i_mode + 2 );
                 }
 
+#ifdef WIN32
+                if( i_recv <= 0 && WSAGetLastError() == WSAEWOULDBLOCK )
+                {
+                    errno=EAGAIN;
+                }
+#endif
+
                 if (i_recv <= 0 && ( end || errno != EAGAIN ) )
                     goto drop;
             }




More information about the vlc-devel mailing list