If we run out of temp sockets, then we should error out, not "fix" the issue by reusing MAX_TMP_SOCKETS -1.

(2.3 r9988)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9998 4a71c877-e1ca-e34f-864e-861f7616d084
master
Buginator 2010-02-24 05:08:30 +00:00 committed by Git SVN Gateway
parent 15b25dcdfe
commit 8a785d511c
1 changed files with 3 additions and 2 deletions

View File

@ -3220,8 +3220,9 @@ static void NETallowJoining(void)
}
if (i == MAX_TMP_SOCKETS)
{
// prevent out-of-bounds access
i--;
// this should *never* happen, it would mean we are going to reuse a socket already in use.
debug(LOG_ERROR, "all temp sockets are used up!");
return;
}
// See if there's an incoming connection