mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 15:21:44 +00:00
Merge pull request #691 from devnexen/network_unix_chg
unix network little change proposal. socket port fits within unsigned…
This commit is contained in:
commit
d4bf1415b7
1 changed files with 4 additions and 4 deletions
|
@ -62,7 +62,7 @@ int ip6_sockets[2];
|
||||||
int ipx_sockets[2];
|
int ipx_sockets[2];
|
||||||
char *multicast_interface = NULL;
|
char *multicast_interface = NULL;
|
||||||
|
|
||||||
int NET_Socket(char *net_interface, int port, netsrc_t type, int family);
|
int NET_Socket(char *net_interface, unsigned short port, netsrc_t type, int family);
|
||||||
char *NET_ErrorString(void);
|
char *NET_ErrorString(void);
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -733,7 +733,7 @@ NET_OpenIP(void)
|
||||||
{
|
{
|
||||||
cvar_t *port, *ip;
|
cvar_t *port, *ip;
|
||||||
|
|
||||||
port = Cvar_Get("port", va("%i", PORT_SERVER), CVAR_NOSET);
|
port = Cvar_Get("port", va("%u", PORT_SERVER), CVAR_NOSET);
|
||||||
ip = Cvar_Get("ip", "localhost", CVAR_NOSET);
|
ip = Cvar_Get("ip", "localhost", CVAR_NOSET);
|
||||||
|
|
||||||
if (!ip6_sockets[NS_SERVER])
|
if (!ip6_sockets[NS_SERVER])
|
||||||
|
@ -803,7 +803,7 @@ NET_Config(qboolean multiplayer)
|
||||||
/* =================================================================== */
|
/* =================================================================== */
|
||||||
|
|
||||||
int
|
int
|
||||||
NET_Socket(char *net_interface, int port, netsrc_t type, int family)
|
NET_Socket(char *net_interface, unsigned short port, netsrc_t type, int family)
|
||||||
{
|
{
|
||||||
char Buf[BUFSIZ], *Host, *Service;
|
char Buf[BUFSIZ], *Host, *Service;
|
||||||
int newsocket, Error;
|
int newsocket, Error;
|
||||||
|
@ -837,7 +837,7 @@ NET_Socket(char *net_interface, int port, netsrc_t type, int family)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sprintf(Buf, "%5d", port);
|
sprintf(Buf, "%5u", port);
|
||||||
Service = Buf;
|
Service = Buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue