1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-23 01:49:53 +03:00

Fix route tracking on x86 Windows

This commit is contained in:
Yihong Wu 2022-05-15 19:42:57 +09:00
parent ca996ed89a
commit 27d7f4cfbe

View File

@ -6185,7 +6185,7 @@ bool IsRouteChanged(ROUTE_CHANGE *r)
} }
#ifdef OS_WIN32 #ifdef OS_WIN32
void Win32RouteChangeCallback(void *context, MIB_IPFORWARD_ROW2 *row, MIB_NOTIFICATION_TYPE nt) void WINAPI Win32RouteChangeCallback(void *context, MIB_IPFORWARD_ROW2 *row, MIB_NOTIFICATION_TYPE nt)
{ {
ROUTE_CHANGE_DATA *data = context; ROUTE_CHANGE_DATA *data = context;
data->Changed = true; data->Changed = true;
@ -6217,12 +6217,12 @@ ROUTE_CHANGE *Win32NewRouteChange2(bool ipv4, bool ipv6, void *callback)
if (callback != NULL) if (callback != NULL)
{ {
ret = NotifyRouteChange2(family, (PIPFORWARD_CHANGE_CALLBACK)callback, r->Data, false, &r->Data->Handle); ret = NotifyRouteChange2(family, (PIPFORWARD_CHANGE_CALLBACK)callback, r->Data, FALSE, &r->Data->Handle);
} }
else else
{ {
// Use default callback if not provided // Use default callback if not provided
ret = NotifyRouteChange2(family, (PIPFORWARD_CHANGE_CALLBACK)Win32RouteChangeCallback, r->Data, false, &r->Data->Handle); ret = NotifyRouteChange2(family, (PIPFORWARD_CHANGE_CALLBACK)Win32RouteChangeCallback, r->Data, FALSE, &r->Data->Handle);
} }
if (ret != NO_ERROR) if (ret != NO_ERROR)