wininet: Handle NULL req->netconn in INTERNET_DIAGNOSTIC_SOCKET_INFO query.
This commit is contained in:
parent
8328562e4c
commit
dd35601b07
@ -1997,7 +1997,7 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe
|
|||||||
info->Flags |= IDSI_FLAG_KEEP_ALIVE;
|
info->Flags |= IDSI_FLAG_KEEP_ALIVE;
|
||||||
if (req->proxy)
|
if (req->proxy)
|
||||||
info->Flags |= IDSI_FLAG_PROXY;
|
info->Flags |= IDSI_FLAG_PROXY;
|
||||||
if (req->netconn->secure)
|
if (req->netconn && req->netconn->secure)
|
||||||
info->Flags |= IDSI_FLAG_SECURE;
|
info->Flags |= IDSI_FLAG_SECURE;
|
||||||
|
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
|
@ -3249,6 +3249,7 @@ static void test_HttpQueryInfo(int port)
|
|||||||
|
|
||||||
static void test_options(int port)
|
static void test_options(int port)
|
||||||
{
|
{
|
||||||
|
INTERNET_DIAGNOSTIC_SOCKET_INFO idsi;
|
||||||
HINTERNET ses, con, req;
|
HINTERNET ses, con, req;
|
||||||
DWORD size, error;
|
DWORD size, error;
|
||||||
DWORD_PTR ctx;
|
DWORD_PTR ctx;
|
||||||
@ -3349,6 +3350,10 @@ static void test_options(int port)
|
|||||||
ok(ret, "InternetQueryOption failed %u\n", GetLastError());
|
ok(ret, "InternetQueryOption failed %u\n", GetLastError());
|
||||||
ok(ctx == 3, "expected 3 got %lu\n", ctx);
|
ok(ctx == 3, "expected 3 got %lu\n", ctx);
|
||||||
|
|
||||||
|
size = sizeof(idsi);
|
||||||
|
ret = InternetQueryOption(req, INTERNET_OPTION_DIAGNOSTIC_SOCKET_INFO, &idsi, &size);
|
||||||
|
ok(ret, "InternetQueryOption failed %u\n", GetLastError());
|
||||||
|
|
||||||
/* INTERNET_OPTION_PROXY */
|
/* INTERNET_OPTION_PROXY */
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = InternetQueryOptionA(ses, INTERNET_OPTION_PROXY, NULL, NULL);
|
ret = InternetQueryOptionA(ses, INTERNET_OPTION_PROXY, NULL, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user