mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-22 12:01:25 +00:00
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:
parent
ff17d664ce
commit
693a184261
1 changed files with 6 additions and 0 deletions
|
@ -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
|
if (!qtv->cluster->lateforward && !qtv->parsingqtvheader) //qtv header being the auth part of the connection rather than the stream
|
||||||
{
|
{
|
||||||
int forwardable;
|
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);
|
forwardable = SV_EarlyParse(qtv, qtv->buffer+qtv->forwardpoint, qtv->buffersize - qtv->forwardpoint);
|
||||||
if (forwardable > 0)
|
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);
|
Sys_Printf(qtv->cluster, "\nServer PERROR from %s: %s\n\n", qtv->server, colon);
|
||||||
qtv->drop = true;
|
qtv->drop = true;
|
||||||
qtv->buffersize = 0;
|
qtv->buffersize = 0;
|
||||||
|
qtv->forwardpoint = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (!strcmp(start, "TERROR") || !strcmp(start, "ERROR"))
|
else if (!strcmp(start, "TERROR") || !strcmp(start, "ERROR"))
|
||||||
{ //we don't support compression, we didn't ask for it.
|
{ //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);
|
Sys_Printf(qtv->cluster, "\nServer TERROR from %s: %s\n\n", qtv->server, colon);
|
||||||
qtv->buffersize = 0;
|
qtv->buffersize = 0;
|
||||||
|
qtv->forwardpoint = 0;
|
||||||
|
|
||||||
if (qtv->disconnectwhennooneiswatching)
|
if (qtv->disconnectwhennooneiswatching)
|
||||||
qtv->drop = true; //if its a user registered stream, drop it immediatly
|
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");
|
Sys_Printf(qtv->cluster, "End of list\n");
|
||||||
qtv->drop = true;
|
qtv->drop = true;
|
||||||
qtv->buffersize = 0;
|
qtv->buffersize = 0;
|
||||||
|
qtv->forwardpoint = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (*authmethod)
|
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");
|
Sys_Printf(qtv->cluster, "QTV server sent no begin command - assuming incompatable\n\n");
|
||||||
qtv->drop = true;
|
qtv->drop = true;
|
||||||
qtv->buffersize = 0;
|
qtv->buffersize = 0;
|
||||||
|
qtv->forwardpoint = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1914,6 +1919,7 @@ printf("%i, %s\n", qtv->buffersize, qtv->buffer);
|
||||||
qtv->sourcesock = INVALID_SOCKET;
|
qtv->sourcesock = INVALID_SOCKET;
|
||||||
}
|
}
|
||||||
qtv->buffersize = 0;
|
qtv->buffersize = 0;
|
||||||
|
qtv->forwardpoint = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue