1
0
mirror of https://github.com/solemnwarning/ipxwrapper synced 2024-12-30 16:45:37 +01:00

Code cleanup.

This commit is contained in:
Daniel Collins 2011-10-03 11:17:05 +00:00
parent 8fd710578d
commit 705ba9a71f
2 changed files with 6 additions and 10 deletions

View File

@ -20,7 +20,7 @@
#define DEFAULT_PORT 54792
#define DEFAULT_CONTROL_PORT 54793
#define TTL 60
#define HOST_TTL 60
#define IFACE_TTL 10
struct reg_value {

View File

@ -31,12 +31,6 @@
#include "interface.h"
#include "router.h"
#define DLL_UNLOAD(dll) \
if(dll) {\
FreeModule(dll);\
dll = NULL;\
}
struct ipaddr_list {
uint32_t ipaddr;
struct ipaddr_list *next;
@ -48,12 +42,14 @@ struct reg_global global_conf;
struct rclient g_rclient;
static ipx_host *hosts = NULL;
static CRITICAL_SECTION sockets_cs;
static CRITICAL_SECTION hosts_cs;
static CRITICAL_SECTION addrs_cs;
/* List of known IPX hosts */
static ipx_host *hosts = NULL;
/* List of local IP addresses with associated IPX interfaces */
static struct ipaddr_list *local_addrs = NULL;
static time_t local_updated = 0;
@ -240,7 +236,7 @@ ipx_host *find_host(const unsigned char *net, const unsigned char *node) {
while(hptr) {
if(memcmp(hptr->ipx_net, net, 4) == 0 && memcmp(hptr->ipx_node, node, 6) == 0) {
if(hptr->last_packet+TTL < time(NULL)) {
if(hptr->last_packet + HOST_TTL < time(NULL)) {
/* Host record has expired, delete */
if(pptr) {