ftemaster Fixups. Should actually work again now.
This commit is contained in:
parent
84438b5f9b
commit
ee534acb8c
3 changed files with 20 additions and 10 deletions
|
@ -2899,6 +2899,7 @@ static ftenet_generic_connection_t *FTENET_Loop_EstablishConnection(ftenet_conne
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
newcon->islisten = col->islisten;
|
newcon->islisten = col->islisten;
|
||||||
|
newcon->prot = adr.prot;
|
||||||
newcon->addrtype[0] = NA_LOOPBACK;
|
newcon->addrtype[0] = NA_LOOPBACK;
|
||||||
newcon->addrtype[1] = NA_INVALID;
|
newcon->addrtype[1] = NA_INVALID;
|
||||||
|
|
||||||
|
@ -4387,6 +4388,7 @@ ftenet_generic_connection_t *FTENET_Datagram_EstablishConnection(ftenet_connecti
|
||||||
|
|
||||||
newcon->owner = col;
|
newcon->owner = col;
|
||||||
newcon->islisten = isserver;
|
newcon->islisten = isserver;
|
||||||
|
newcon->prot = adr.prot;
|
||||||
if (hybrid)
|
if (hybrid)
|
||||||
{
|
{
|
||||||
newcon->addrtype[0] = NA_IP;
|
newcon->addrtype[0] = NA_IP;
|
||||||
|
@ -7867,6 +7869,7 @@ static qboolean FTENET_TCP_ChangeLocalAddress(struct ftenet_generic_connection_s
|
||||||
n.scopeid = adr->scopeid;
|
n.scopeid = adr->scopeid;
|
||||||
addrsize2 = NetadrToSockadr(&n, &cur);
|
addrsize2 = NetadrToSockadr(&n, &cur);
|
||||||
|
|
||||||
|
con->prot = NP_STREAM;
|
||||||
if ((bind(newsocket, (struct sockaddr *)&cur, addrsize2) != INVALID_SOCKET) &&
|
if ((bind(newsocket, (struct sockaddr *)&cur, addrsize2) != INVALID_SOCKET) &&
|
||||||
(listen(newsocket, 2) != INVALID_SOCKET) &&
|
(listen(newsocket, 2) != INVALID_SOCKET) &&
|
||||||
ioctlsocket (newsocket, FIONBIO, &_true) != -1)
|
ioctlsocket (newsocket, FIONBIO, &_true) != -1)
|
||||||
|
@ -8026,6 +8029,7 @@ ftenet_generic_connection_t *FTENET_TCP_EstablishConnection(ftenet_connections_t
|
||||||
newcon = Z_Malloc(sizeof(*newcon));
|
newcon = Z_Malloc(sizeof(*newcon));
|
||||||
newcon->generic.thesocket = newsocket = INVALID_SOCKET;
|
newcon->generic.thesocket = newsocket = INVALID_SOCKET;
|
||||||
|
|
||||||
|
newcon->generic.prot = adr.prot;
|
||||||
newcon->generic.addrtype[0] = adr.type;
|
newcon->generic.addrtype[0] = adr.type;
|
||||||
newcon->generic.addrtype[1] = NA_INVALID;
|
newcon->generic.addrtype[1] = NA_INVALID;
|
||||||
|
|
||||||
|
@ -8732,6 +8736,7 @@ struct ftenet_generic_connection_s *FTENET_IRCConnect_EstablishConnection(qboole
|
||||||
newcon->generic.Close = FTENET_IRCConnect_Close;
|
newcon->generic.Close = FTENET_IRCConnect_Close;
|
||||||
|
|
||||||
newcon->generic.islisten = isserver;
|
newcon->generic.islisten = isserver;
|
||||||
|
newcon->generic.prot = adr.prot;
|
||||||
newcon->generic.addrtype[0] = NA_IRC;
|
newcon->generic.addrtype[0] = NA_IRC;
|
||||||
newcon->generic.addrtype[1] = NA_INVALID;
|
newcon->generic.addrtype[1] = NA_INVALID;
|
||||||
|
|
||||||
|
@ -9309,6 +9314,7 @@ static ftenet_generic_connection_t *FTENET_WebSocket_EstablishConnection(ftenet_
|
||||||
newcon->generic.Close = FTENET_WebSocket_Close;
|
newcon->generic.Close = FTENET_WebSocket_Close;
|
||||||
|
|
||||||
newcon->generic.islisten = isserver;
|
newcon->generic.islisten = isserver;
|
||||||
|
newcon->generic.prot = adr.prot;
|
||||||
newcon->generic.addrtype[0] = NA_WEBSOCKET;
|
newcon->generic.addrtype[0] = NA_WEBSOCKET;
|
||||||
newcon->generic.addrtype[1] = NA_INVALID;
|
newcon->generic.addrtype[1] = NA_INVALID;
|
||||||
|
|
||||||
|
@ -9360,6 +9366,7 @@ static ftenet_generic_connection_t *FTENET_WebRTC_EstablishConnection(ftenet_con
|
||||||
newcon->generic.Close = FTENET_WebSocket_Close;
|
newcon->generic.Close = FTENET_WebSocket_Close;
|
||||||
|
|
||||||
newcon->generic.islisten = isserver;
|
newcon->generic.islisten = isserver;
|
||||||
|
newcon->generic.prot = adr.prot;
|
||||||
newcon->generic.addrtype[0] = NA_WEBSOCKET;
|
newcon->generic.addrtype[0] = NA_WEBSOCKET;
|
||||||
newcon->generic.addrtype[1] = NA_INVALID;
|
newcon->generic.addrtype[1] = NA_INVALID;
|
||||||
|
|
||||||
|
|
|
@ -4404,7 +4404,7 @@ qboolean SV_ConnectionlessPacket (void)
|
||||||
{ //q3/dpmaster support
|
{ //q3/dpmaster support
|
||||||
if (sv_public.ival >= 0)
|
if (sv_public.ival >= 0)
|
||||||
{
|
{
|
||||||
const char *chal = Cmd_Args();
|
const char *chal = Cmd_Argv(1);
|
||||||
SV_Master_HeartbeatResponse(&net_from, chal);
|
SV_Master_HeartbeatResponse(&net_from, chal);
|
||||||
|
|
||||||
if (SV_DetectAmplificationDDOS())
|
if (SV_DetectAmplificationDDOS())
|
||||||
|
|
|
@ -1408,7 +1408,10 @@ static void SVM_ProcessUDPPacket(void)
|
||||||
sb.maxsize = sizeof(net_message_buffer);
|
sb.maxsize = sizeof(net_message_buffer);
|
||||||
sb.data = net_message_buffer;
|
sb.data = net_message_buffer;
|
||||||
MSG_WriteLong(&sb, -1);
|
MSG_WriteLong(&sb, -1);
|
||||||
MSG_WriteString(&sb, va("getinfo %s %s\n", ourchallenge,cookie));
|
if (*cookie)
|
||||||
|
MSG_WriteString(&sb, va("getinfo %s %s\n", ourchallenge,cookie));
|
||||||
|
else
|
||||||
|
MSG_WriteString(&sb, va("getinfo %s\n", ourchallenge));
|
||||||
sb.cursize--;
|
sb.cursize--;
|
||||||
NET_SendPacket(svm_sockets, sb.cursize, sb.data, &net_from);
|
NET_SendPacket(svm_sockets, sb.cursize, sb.data, &net_from);
|
||||||
|
|
||||||
|
@ -1474,6 +1477,14 @@ static void SVM_ProcessUDPPacket(void)
|
||||||
const char *v = Info_ValueForKey(s, "deathmatch");
|
const char *v = Info_ValueForKey(s, "deathmatch");
|
||||||
srv->type = *v && !atoi(v);
|
srv->type = *v && !atoi(v);
|
||||||
}
|
}
|
||||||
|
Q_strncpyz(srv->hostname, Info_ValueForKey(s, "hostname"), sizeof(srv->hostname));
|
||||||
|
Q_strncpyz(srv->gamedir, Info_ValueForKey(s, "modname"), sizeof(srv->gamedir));
|
||||||
|
Q_strncpyz(srv->mapname, Info_ValueForKey(s, "mapname"), sizeof(srv->mapname));
|
||||||
|
Q_strncpyz(srv->version, Info_ValueForKey(s, "version"), sizeof(srv->version));
|
||||||
|
if (!*srv->version)
|
||||||
|
Q_strncpyz(srv->version, Info_ValueForKey(s, "*version"), sizeof(srv->version));
|
||||||
|
if (!*srv->version)
|
||||||
|
Q_strncpyz(srv->version, Info_ValueForKey(s, "ver"), sizeof(srv->version));
|
||||||
srv->protover = strtol(Info_ValueForKey(s, "protocol"), &s, 0);
|
srv->protover = strtol(Info_ValueForKey(s, "protocol"), &s, 0);
|
||||||
for (; *s; s++)
|
for (; *s; s++)
|
||||||
{
|
{
|
||||||
|
@ -1484,14 +1495,6 @@ static void SVM_ProcessUDPPacket(void)
|
||||||
}
|
}
|
||||||
if (*Info_ValueForKey(srv->rules, "_turnkey"))
|
if (*Info_ValueForKey(srv->rules, "_turnkey"))
|
||||||
srv->type |= 8;
|
srv->type |= 8;
|
||||||
Q_strncpyz(srv->hostname, Info_ValueForKey(s, "hostname"), sizeof(srv->hostname));
|
|
||||||
Q_strncpyz(srv->gamedir, Info_ValueForKey(s, "modname"), sizeof(srv->gamedir));
|
|
||||||
Q_strncpyz(srv->mapname, Info_ValueForKey(s, "mapname"), sizeof(srv->mapname));
|
|
||||||
Q_strncpyz(srv->version, Info_ValueForKey(s, "version"), sizeof(srv->version));
|
|
||||||
if (!*srv->version)
|
|
||||||
Q_strncpyz(srv->version, Info_ValueForKey(s, "*version"), sizeof(srv->version));
|
|
||||||
if (!*srv->version)
|
|
||||||
Q_strncpyz(srv->version, Info_ValueForKey(s, "ver"), sizeof(srv->version));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue