mirror of
https://github.com/solemnwarning/ipxwrapper
synced 2024-12-30 16:45:37 +01:00
Removed addr_cache_ttl and iface_ttl from main_config structure.
This commit is contained in:
parent
d8a0dcf5c8
commit
f087fc26b1
@ -26,6 +26,8 @@
|
||||
#include "common.h"
|
||||
#include "ipxwrapper.h"
|
||||
|
||||
#define ADDR_CACHE_TTL 30
|
||||
|
||||
struct host_table_key {
|
||||
addr32_t netnum;
|
||||
addr48_t nodenum;
|
||||
@ -123,7 +125,7 @@ int addr_cache_get(SOCKADDR_STORAGE *addr, size_t *addrlen, addr32_t net, addr48
|
||||
|
||||
host_table_t *host = host_table_find(net, node);
|
||||
|
||||
if(host && time(NULL) < host->time + main_config.addr_cache_ttl)
|
||||
if(host && time(NULL) < host->time + ADDR_CACHE_TTL)
|
||||
{
|
||||
memcpy(addr, &(host->addr), host->addrlen);
|
||||
*addrlen = host->addrlen;
|
||||
|
@ -31,8 +31,6 @@ main_config_t get_main_config(void)
|
||||
config.w95_bug = true;
|
||||
config.bcast_all = false;
|
||||
config.src_filter = true;
|
||||
config.addr_cache_ttl = 30;
|
||||
config.iface_ttl = 5;
|
||||
|
||||
HKEY reg = reg_open_main(false);
|
||||
DWORD version = reg_get_dword(reg, "config_version", 1);
|
||||
|
@ -37,9 +37,6 @@ typedef struct main_config {
|
||||
|
||||
enum ipx_log_level log_level;
|
||||
|
||||
unsigned int addr_cache_ttl;
|
||||
unsigned int iface_ttl;
|
||||
|
||||
bool single_iface;
|
||||
addr32_t single_netnum;
|
||||
addr48_t single_nodenum;
|
||||
|
@ -104,7 +104,6 @@ extern struct rclient g_rclient;
|
||||
ipx_socket *get_socket(SOCKET fd);
|
||||
void lock_sockets(void);
|
||||
void unlock_sockets(void);
|
||||
BOOL ip_is_local(uint32_t ipaddr);
|
||||
|
||||
INT APIENTRY r_EnumProtocolsA(LPINT,LPVOID,LPDWORD);
|
||||
INT APIENTRY r_EnumProtocolsW(LPINT,LPVOID,LPDWORD);
|
||||
|
Loading…
x
Reference in New Issue
Block a user