aboutsummaryrefslogtreecommitdiffstats
path: root/router/router.c
diff options
context:
space:
mode:
Diffstat (limited to 'router/router.c')
-rw-r--r--router/router.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/router/router.c b/router/router.c
index 86189b78..4dfae314 100644
--- a/router/router.c
+++ b/router/router.c
@@ -15,6 +15,8 @@ DriverIface *DriverList = NULL;
int DriverListSize = 0;
static int DriverListSizeMax = 0;
+almtx_t EnumerationLock;
+
static void LoadDriverList(void);
@@ -26,6 +28,7 @@ BOOL APIENTRY DllMain(HINSTANCE UNUSED(module), DWORD reason, void* UNUSED(reser
{
case DLL_PROCESS_ATTACH:
LoadDriverList();
+ almtx_init(&EnumerationLock, almtx_recursive);
break;
case DLL_THREAD_ATTACH:
@@ -34,6 +37,7 @@ BOOL APIENTRY DllMain(HINSTANCE UNUSED(module), DWORD reason, void* UNUSED(reser
case DLL_PROCESS_DETACH:
ReleaseALC();
+ almtx_destroy(&EnumerationLock);
for(i = 0;i < DriverListSize;i++)
{
if(DriverList[i].Module)