net_defs.h (net_driver_t): Removed the controlSock member. It is not used

for any purpose in either of Loop, Datagram or Serial drivers. It used to
be assigned the value returned by the Init() procedure of the relevant
driver which is either 0 for success or -1 for failure, therefore there is
no purpose to it at all.
net_main.c (NET_Init): Removed the controlSocket var and adjusted for the
net_driver_t change.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@213 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2010-06-21 10:50:21 +00:00
parent 721b07063f
commit 6ea46b7329
2 changed files with 1 additions and 5 deletions

View file

@ -205,7 +205,6 @@ typedef struct
qboolean (*CanSendUnreliableMessage) (qsocket_t *sock);
void (*Close) (qsocket_t *sock);
void (*Shutdown) (void);
int controlSock;
} net_driver_t;
extern net_driver_t net_drivers[MAX_NET_DRIVERS];

View file

@ -721,7 +721,6 @@ NET_Init
void NET_Init (void)
{
int i;
int controlSocket;
qsocket_t *s;
i = COM_CheckParm ("-port");
@ -776,12 +775,10 @@ void NET_Init (void)
// initialize all the drivers
for (i = net_driverlevel = 0; net_driverlevel < net_numdrivers; net_driverlevel++)
{
controlSocket = net_drivers[net_driverlevel].Init();
if (controlSocket == -1)
if (net_drivers[net_driverlevel].Init() == -1)
continue;
i++;
net_drivers[net_driverlevel].initialized = true;
net_drivers[net_driverlevel].controlSock = controlSocket;
if (listening)
net_drivers[net_driverlevel].Listen (true);
}