diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-11-01 05:54:56 +0100 |
---|---|---|
committer | Simon Rozman <simon@rozman.si> | 2020-11-02 09:17:47 +0100 |
commit | b5836e9fb9b78c6b9034a735034610c7a97276a1 (patch) | |
tree | a83175eb34477ffd938203fd5db05078af8b91ec /api/adapter.c | |
parent | api: avoid call to CM_Get_DevNode_Status (diff) | |
download | wintun-b5836e9fb9b78c6b9034a735034610c7a97276a1.tar.xz wintun-b5836e9fb9b78c6b9034a735034610c7a97276a1.zip |
api: make version function uniform
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'api/adapter.c')
-rw-r--r-- | api/adapter.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/api/adapter.c b/api/adapter.c index 95b844b..5431bc3 100644 --- a/api/adapter.c +++ b/api/adapter.c @@ -1381,8 +1381,8 @@ CreateTemporaryDirectory(_Out_cap_c_(MAX_PATH) WCHAR *RandomTempSubDirectory) return ERROR_SUCCESS; } -static DWORDLONG -RunningWintunVersion(void) +DWORDLONG +WintunGetVersion(void) { DWORDLONG Version = 0; PRTL_PROCESS_MODULES Modules; @@ -1424,7 +1424,7 @@ out: static BOOL EnsureWintunUnloaded(VOID) { BOOL Loaded; - for (int i = 0; (Loaded = RunningWintunVersion() != 0) != FALSE && i < 300; ++i) + for (int i = 0; (Loaded = WintunGetVersion() != 0) != FALSE && i < 300; ++i) Sleep(50); return !Loaded; } @@ -1461,7 +1461,7 @@ InstallDriver(_Out_writes_z_(MAX_PATH) WCHAR InfStorePath[MAX_PATH], _Inout_ BOO goto cleanupDelete; } - DWORDLONG LoadedDriverVersion = RunningWintunVersion(); + DWORDLONG LoadedDriverVersion = WintunGetVersion(); HDEVINFO DevInfo = INVALID_HANDLE_VALUE; SP_DEVINFO_DATA_LIST *ExistingAdapters = NULL; if (LoadedDriverVersion) |