mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-27 13:14:26 -04:00
[net] switch to INetworkListManager::GetConnectivity to detect connectivity
* InternetGetConnectedState() is next to useless and doesn't provide coherent outcome on the ARM64 platform I'm testing with. This results in Rufus declaring that Internet is unavailable on platforms that do have actual Internet connectivity. * Swicth to using INetworkListManager::GetConnectivity(), which actually reports a dependable result. * Closes #1691 * Also remove the mutex for uprintf(), which may produce thread lockout and remove an unwanted double GetSignatureName() call on startup.
This commit is contained in:
parent
e4372a9f57
commit
b2492908be
6 changed files with 36 additions and 29 deletions
|
@ -43,7 +43,6 @@
|
|||
HWND hStatus;
|
||||
size_t ubuffer_pos = 0;
|
||||
char ubuffer[UBUFFER_SIZE]; // Buffer for ubpushf() messages we don't log right away
|
||||
static HANDLE print_mutex = NULL;
|
||||
|
||||
void _uprintf(const char *format, ...)
|
||||
{
|
||||
|
@ -53,11 +52,6 @@ void _uprintf(const char *format, ...)
|
|||
va_list args;
|
||||
int n;
|
||||
|
||||
if (print_mutex == NULL)
|
||||
print_mutex = CreateMutex(NULL, FALSE, NULL);
|
||||
if (WaitForSingleObject(print_mutex, INFINITE) != WAIT_OBJECT_0)
|
||||
return;
|
||||
|
||||
va_start(args, format);
|
||||
n = safe_vsnprintf(p, sizeof(buf)-3, format, args); // buf-3 is room for CR/LF/NUL
|
||||
va_end(args);
|
||||
|
@ -84,8 +78,6 @@ void _uprintf(const char *format, ...)
|
|||
Edit_Scroll(hLog, Edit_GetLineCount(hLog), 0);
|
||||
}
|
||||
free(wbuf);
|
||||
|
||||
ReleaseMutex(print_mutex);
|
||||
}
|
||||
|
||||
void _uprintfs(const char* str)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue