From: Oskar L. <os...@os...> - 2004-07-02 22:37:52
|
Here's a fix for a trivial bug which only occurs when stdin (fd 0) is closed. Please let me know if this patch is taken care of/applied or not, that way I'll know that I've sent this to the appropriate place. Regards, Oskar Liljeblad (os...@os...) diff -u -p upnp/src/genlib/miniserver/miniserver.c.v0 upnp/src/genlib/miniserver/miniserver.c --- upnp/src/genlib/miniserver/miniserver.c.v0 2004-07-03 00:32:18.000000000 +0200 +++ upnp/src/genlib/miniserver/miniserver.c 2004-07-03 00:32:34.000000000 +0200 @@ -598,7 +598,7 @@ get_miniserver_sockets( MiniServerSockAr int miniServerStopSock; listenfd = socket( AF_INET, SOCK_STREAM, 0 ); - if( listenfd <= 0 ) { + if( listenfd < 0 ) { return UPNP_E_OUTOF_SOCKET; // error creating socket } // As per the IANA specifications for the use of ports by applications |