mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-28 13:21:10 +00:00
Merge branch 'allow-localhost' into 'master'
Allow connecting to localhost / 127.0.0.1 See merge request STJr/SRB2!474
This commit is contained in:
commit
b5a1030722
1 changed files with 7 additions and 3 deletions
10
src/i_tcp.c
10
src/i_tcp.c
|
@ -612,7 +612,7 @@ static boolean SOCK_Get(void)
|
||||||
if (c != ERRSOCKET)
|
if (c != ERRSOCKET)
|
||||||
{
|
{
|
||||||
// find remote node number
|
// find remote node number
|
||||||
for (j = 0; j <= MAXNETNODES; j++) //include LAN
|
for (j = 1; j <= MAXNETNODES; j++) //include LAN
|
||||||
{
|
{
|
||||||
if (SOCK_cmpaddr(&fromaddress, &clientaddress[j], 0))
|
if (SOCK_cmpaddr(&fromaddress, &clientaddress[j], 0))
|
||||||
{
|
{
|
||||||
|
@ -1340,8 +1340,12 @@ static SINT8 SOCK_NetMakeNodewPort(const char *address, const char *port)
|
||||||
while (runp != NULL)
|
while (runp != NULL)
|
||||||
{
|
{
|
||||||
// find ip of the server
|
// find ip of the server
|
||||||
memcpy(&clientaddress[newnode], runp->ai_addr, runp->ai_addrlen);
|
if (sendto(mysockets[0], NULL, 0, 0, runp->ai_addr, runp->ai_addrlen) == 0)
|
||||||
runp = NULL;
|
{
|
||||||
|
memcpy(&clientaddress[newnode], runp->ai_addr, runp->ai_addrlen);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
runp = runp->ai_next;
|
||||||
}
|
}
|
||||||
I_freeaddrinfo(ai);
|
I_freeaddrinfo(ai);
|
||||||
return newnode;
|
return newnode;
|
||||||
|
|
Loading…
Reference in a new issue