|
|
@ -668,7 +668,7 @@ static void HttpRequestGet(HINTERNET hConnect) |
|
|
|
const wchar *path = BuildTypeServerStatusPath();
|
|
|
|
const wchar *path = BuildTypeServerStatusPath();
|
|
|
|
HINTERNET hRequest = 0; |
|
|
|
HINTERNET hRequest = 0; |
|
|
|
char data[256] = {0}; |
|
|
|
char data[256] = {0}; |
|
|
|
DWORD bytesRead; |
|
|
|
DWORD bytesRead = 0; |
|
|
|
|
|
|
|
|
|
|
|
hRequest = WinHttpOpenRequest( |
|
|
|
hRequest = WinHttpOpenRequest( |
|
|
|
hConnect,
|
|
|
|
hConnect,
|
|
|
@ -693,11 +693,13 @@ static void HttpRequestGet(HINTERNET hConnect) |
|
|
|
if(b) |
|
|
|
if(b) |
|
|
|
{ |
|
|
|
{ |
|
|
|
DWORD err = GetLastError(); |
|
|
|
DWORD err = GetLastError(); |
|
|
|
WinHttpReceiveResponse(hRequest, 0); |
|
|
|
if (WinHttpReceiveResponse(hRequest, 0) |
|
|
|
WinHttpReadData(hRequest, data, arrsize(data)-1, &bytesRead); |
|
|
|
&& WinHttpReadData(hRequest, data, arrsize(data) - 1, &bytesRead)) |
|
|
|
|
|
|
|
{ |
|
|
|
data[bytesRead] = 0; |
|
|
|
data[bytesRead] = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
if(bytesRead) |
|
|
|
if(bytesRead) |
|
|
|
SetStatusText(data); |
|
|
|
SetStatusText(data); |
|
|
|
WinHttpCloseHandle(hRequest); |
|
|
|
WinHttpCloseHandle(hRequest); |
|
|
|