Molgrum found a bug with how early-parsing interacts with the rest of the code. This should fix that bug.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2771 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2007-10-30 14:26:03 +00:00
parent ff17d664ce
commit 693a184261

View file

@ -798,6 +798,7 @@ qboolean Net_ReadStream(sv_t *qtv)
if (!qtv->cluster->lateforward && !qtv->parsingqtvheader) //qtv header being the auth part of the connection rather than the stream
{
int forwardable;
//this has the effect of not only parsing early packets, but also saying how much complete data there is.
forwardable = SV_EarlyParse(qtv, qtv->buffer+qtv->forwardpoint, qtv->buffersize - qtv->forwardpoint);
if (forwardable > 0)
{
@ -1756,12 +1757,14 @@ printf("%i, %s\n", qtv->buffersize, qtv->buffer);
Sys_Printf(qtv->cluster, "\nServer PERROR from %s: %s\n\n", qtv->server, colon);
qtv->drop = true;
qtv->buffersize = 0;
qtv->forwardpoint = 0;
return;
}
else if (!strcmp(start, "TERROR") || !strcmp(start, "ERROR"))
{ //we don't support compression, we didn't ask for it.
Sys_Printf(qtv->cluster, "\nServer TERROR from %s: %s\n\n", qtv->server, colon);
qtv->buffersize = 0;
qtv->forwardpoint = 0;
if (qtv->disconnectwhennooneiswatching)
qtv->drop = true; //if its a user registered stream, drop it immediatly
@ -1819,6 +1822,7 @@ printf("%i, %s\n", qtv->buffersize, qtv->buffer);
Sys_Printf(qtv->cluster, "End of list\n");
qtv->drop = true;
qtv->buffersize = 0;
qtv->forwardpoint = 0;
return;
}
else if (*authmethod)
@ -1831,6 +1835,7 @@ printf("%i, %s\n", qtv->buffersize, qtv->buffer);
Sys_Printf(qtv->cluster, "QTV server sent no begin command - assuming incompatable\n\n");
qtv->drop = true;
qtv->buffersize = 0;
qtv->forwardpoint = 0;
return;
}
@ -1914,6 +1919,7 @@ printf("%i, %s\n", qtv->buffersize, qtv->buffer);
qtv->sourcesock = INVALID_SOCKET;
}
qtv->buffersize = 0;
qtv->forwardpoint = 0;
break;
}