mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-20 17:31:08 +00:00
Nuke a dead function.
This commit is contained in:
parent
b0c93aa24f
commit
e15771f4a4
3 changed files with 0 additions and 64 deletions
|
@ -71,7 +71,6 @@ qboolean NET_CompareBaseAdr (netadr_t a, netadr_t b);
|
|||
const char *NET_AdrToString (netadr_t a);
|
||||
const char *NET_BaseAdrToString (netadr_t a);
|
||||
qboolean NET_StringToAdr (const char *s, netadr_t *a);
|
||||
qboolean NET_IsClientLegal(netadr_t *adr);
|
||||
|
||||
|
||||
int Net_Log_Init (const char **sound_precache);
|
||||
|
|
|
@ -229,37 +229,6 @@ NET_StringToAdr (const char *s, netadr_t *a)
|
|||
return true;
|
||||
}
|
||||
|
||||
// Returns true if we can't bind the address locally--in other words,
|
||||
// the IP is NOT one of our interfaces.
|
||||
qboolean
|
||||
NET_IsClientLegal (netadr_t *adr)
|
||||
{
|
||||
#if 0
|
||||
int newsocket;
|
||||
AF_address_t sadr;
|
||||
|
||||
if (adr->ip[0] == 127)
|
||||
return false; // no local connections period
|
||||
|
||||
NetadrToSockadr (adr, &sadr);
|
||||
|
||||
if ((newsocket = socket (PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1)
|
||||
Sys_Error ("NET_IsClientLegal: socket:", strerror (errno));
|
||||
|
||||
sadr.sin_port = 0;
|
||||
|
||||
if (bind (newsocket, (void *) &sadr, sizeof (sadr)) == -1) {
|
||||
// It is not a local address
|
||||
close (newsocket);
|
||||
return true;
|
||||
}
|
||||
close (newsocket);
|
||||
return false;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
qboolean
|
||||
NET_GetPacket (void)
|
||||
{
|
||||
|
@ -422,7 +391,6 @@ NET_Init (int port)
|
|||
Sys_Error ("Winsock initialization failed.");
|
||||
#endif /* _WIN32 */
|
||||
|
||||
// open the single socket to be used for all communications
|
||||
net_socket = UDP_OpenSocket (port);
|
||||
|
||||
// init the message buffer
|
||||
|
|
|
@ -375,37 +375,6 @@ NET_StringToAdr (const char *s, netadr_t *a)
|
|||
return true;
|
||||
}
|
||||
|
||||
// Returns true if we can't bind the address locally--in other words,
|
||||
// the IP is NOT one of our interfaces.
|
||||
qboolean
|
||||
NET_IsClientLegal (netadr_t *adr)
|
||||
{
|
||||
#if 0
|
||||
int newsocket;
|
||||
struct sockaddr_in sadr;
|
||||
|
||||
if (adr->ip[0] == 127)
|
||||
return false; // no local connections period
|
||||
|
||||
NetadrToSockadr (adr, &sadr);
|
||||
|
||||
if ((newsocket = socket (PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1)
|
||||
Sys_Error ("NET_IsClientLegal: socket: %s", strerror (errno));
|
||||
|
||||
sadr.sin_port = 0;
|
||||
|
||||
if (bind (newsocket, (void *) &sadr, sizeof (sadr)) == -1) {
|
||||
// It is not a local address
|
||||
close (newsocket);
|
||||
return true;
|
||||
}
|
||||
close (newsocket);
|
||||
return false;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
qboolean
|
||||
NET_GetPacket (void)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue