[net] Move found host caching into net_main

This unifies all the checks and plugs a set of potential buffer
overflows.
This commit is contained in:
Bill Currie 2021-04-04 18:38:14 +09:00
parent a630c95eb6
commit 9fb337fac4
4 changed files with 85 additions and 72 deletions

View file

@ -262,8 +262,9 @@ typedef struct {
netadr_t addr;
} hostcache_t;
extern int hostCacheCount;
extern hostcache_t hostcache[HOSTCACHESIZE];
void NET_AddCachedHost (const char *name, const char *map, const char *cname,
int users, int maxusers, int driver, int ldriver,
const netadr_t *addr);
extern double net_time;
extern struct msg_s *net_message;