Merge branch 'mserv-is-dumb-and-what-else-is-new' into 'master'

Fuck NONET

See merge request STJr/SRB2!699
This commit is contained in:
Alam Ed Arias 2020-01-17 11:11:02 -05:00
commit b38921ff53
1 changed files with 9 additions and 6 deletions

View File

@ -323,13 +323,9 @@ static INT32 GetServersList(void)
// //
// MS_Connect() // MS_Connect()
// //
#ifndef NONET
static INT32 MS_SubConnect(const char *ip_addr, const char *str_port, INT32 async, struct sockaddr *bindaddr, socklen_t bindaddrlen) static INT32 MS_SubConnect(const char *ip_addr, const char *str_port, INT32 async, struct sockaddr *bindaddr, socklen_t bindaddrlen)
{ {
#ifdef NONET
(void)ip_addr;
(void)str_port;
(void)async;
#else
struct my_addrinfo *ai, *runp, hints; struct my_addrinfo *ai, *runp, hints;
int gaie; int gaie;
@ -402,12 +398,18 @@ static INT32 MS_SubConnect(const char *ip_addr, const char *str_port, INT32 asyn
runp = runp->ai_next; runp = runp->ai_next;
} }
I_freeaddrinfo(ai); I_freeaddrinfo(ai);
#endif
return MS_CONNECT_ERROR; return MS_CONNECT_ERROR;
} }
#endif/*NONET xd*/
static INT32 MS_Connect(const char *ip_addr, const char *str_port, INT32 async) static INT32 MS_Connect(const char *ip_addr, const char *str_port, INT32 async)
{ {
#ifdef NONET
(void)ip_addr;
(void)str_port;
(void)async;
return MS_CONNECT_ERROR;
#else
const char *lhost; const char *lhost;
struct my_addrinfo hints; struct my_addrinfo hints;
struct my_addrinfo *ai, *aip; struct my_addrinfo *ai, *aip;
@ -443,6 +445,7 @@ static INT32 MS_Connect(const char *ip_addr, const char *str_port, INT32 async)
} }
else else
return MS_SubConnect(ip_addr, str_port, async, 0, 0); return MS_SubConnect(ip_addr, str_port, async, 0, 0);
#endif/*NONET xd*/
} }
#define NUM_LIST_SERVER MAXSERVERLIST #define NUM_LIST_SERVER MAXSERVERLIST