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

Properly initialise address table.

This commit is contained in:
Daniel Collins 2012-11-18 17:00:36 +00:00
parent d9ee86d985
commit 0faeb985d2
2 changed files with 9 additions and 0 deletions

View File

@ -81,6 +81,8 @@ void addr_table_init(void)
return; return;
} }
addr_table_base = (addr_table_entry_t*)(addr_table_header + 1);
if(new_table) if(new_table)
{ {
/* Initialise the address table. */ /* Initialise the address table. */
@ -96,6 +98,8 @@ void addr_table_init(void)
return; return;
} }
addr_table_unlock();
} }
/* Release all handles to the address table and associated objects. */ /* Release all handles to the address table and associated objects. */

View File

@ -31,6 +31,7 @@
#include "interface.h" #include "interface.h"
#include "router.h" #include "router.h"
#include "addrcache.h" #include "addrcache.h"
#include "addrtable.h"
extern const char *version_string; extern const char *version_string;
extern const char *compile_time; extern const char *compile_time;
@ -91,12 +92,16 @@ BOOL WINAPI DllMain(HINSTANCE me, DWORD why, LPVOID res)
return FALSE; return FALSE;
} }
addr_table_init();
router_init(); router_init();
} }
else if(why == DLL_PROCESS_DETACH) else if(why == DLL_PROCESS_DETACH)
{ {
router_cleanup(); router_cleanup();
addr_table_cleanup();
WSACleanup(); WSACleanup();
DeleteCriticalSection(&sockets_cs); DeleteCriticalSection(&sockets_cs);