Bug fix in select of miniserver.c

Fix a bug in miniserver.c, in which maxMiniSock was wrongly declared as
unsigned int and as a result it was beeng set to ((unsigned int)(-1)).
As a result, after beeing incremented, it became zero, and this value
was beeing used in the select() call.

Thanks to Fabrice Fontaine for helping and testing with this issue.
(cherry picked from commit 2bdc9e075e33efa35f49e8a9766e75df9eb91420)
This commit is contained in:
Marcelo Roberto Jimenez 2010-10-19 15:49:36 -02:00
parent 5d651475d5
commit 1cc60c83f4
2 changed files with 11 additions and 1 deletions

View File

@ -221,6 +221,16 @@ Version 1.8.0
Version 1.6.8
*******************************************************************************
2010-10-15 Marcelo Roberto Jimenez <mroberto(at)users.sourceforge.net>
Bug fix in select of miniserver.c
Fix a bug in miniserver.c, in which maxMiniSock was wrongly declared as
unsigned int and as a result it was beeng set to ((unsigned int)(-1)).
As a result, after beeing incremented, it became zero, and this value
was beeing used in the select() call.
Thanks to Fabrice Fontaine for helping and testing with this issue.
*******************************************************************************
Version 1.6.7

View File

@ -390,7 +390,7 @@ static void RunMiniServer(
char errorBuffer[ERROR_BUFFER_LEN];
fd_set expSet;
fd_set rdSet;
unsigned int maxMiniSock;
int maxMiniSock;
int ret = 0;
int stopSock = 0;