mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 14:42:13 +00:00
Fixed a bug in the html demo listing. Tolerate telnet users spamming the server.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2457 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
2a10d9860e
commit
5596b146fe
1 changed files with 11 additions and 8 deletions
|
@ -786,6 +786,8 @@ void SV_GenerateQTVDemoListing(cluster_t *cluster, oproxy_t *dest)
|
|||
WIN32_FIND_DATA ffd;
|
||||
HANDLE h;
|
||||
h = FindFirstFile("*.mvd", &ffd);
|
||||
if (h != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
do
|
||||
{
|
||||
numdemos++;
|
||||
|
@ -794,6 +796,7 @@ void SV_GenerateQTVDemoListing(cluster_t *cluster, oproxy_t *dest)
|
|||
} while(FindNextFile(h, &ffd));
|
||||
FindClose(h);
|
||||
}
|
||||
}
|
||||
#else
|
||||
{
|
||||
int namelen;
|
||||
|
@ -891,7 +894,7 @@ qboolean SV_ReadPendingProxy(cluster_t *cluster, oproxy_t *pend)
|
|||
|
||||
if (pend->inbuffersize >= 4)
|
||||
{
|
||||
if (strncmp(pend->inbuffer, "QTV\n", 4) && strncmp(pend->inbuffer, "GET ", 4) && strncmp(pend->inbuffer, "POST ", 5))
|
||||
if (strncmp(pend->inbuffer, "QTV\r", 4) && strncmp(pend->inbuffer, "QTV\n", 4) && strncmp(pend->inbuffer, "GET ", 4) && strncmp(pend->inbuffer, "POST ", 5))
|
||||
{ //I have no idea what the smeg you are.
|
||||
pend->drop = true;
|
||||
return false;
|
||||
|
@ -1026,7 +1029,7 @@ qboolean SV_ReadPendingProxy(cluster_t *cluster, oproxy_t *pend)
|
|||
s = e;
|
||||
while(*e)
|
||||
{
|
||||
if (*e == '\n')
|
||||
if (*e == '\n' || *e == '\r')
|
||||
{
|
||||
*e = '\0';
|
||||
colon = strchr(s, ':');
|
||||
|
|
Loading…
Reference in a new issue