Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
f33f7a5d
Commit
f33f7a5d
authored
Dec 19, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Dec 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Map socket errors to ERROR_INTERNET_CANNOT_CONNECT in create_netconn_socket.
parent
10cb483c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
1 deletion
+28
-1
netconnection.c
dlls/wininet/netconnection.c
+1
-1
http.c
dlls/wininet/tests/http.c
+27
-0
No files found.
dlls/wininet/netconnection.c
View file @
f33f7a5d
...
...
@@ -646,7 +646,7 @@ static DWORD create_netconn_socket(server_t *server, netconn_t *netconn, DWORD t
}
}
if
(
result
==
-
1
)
return
sock_get_error
(
errno
)
;
return
ERROR_INTERNET_CANNOT_CONNECT
;
#ifdef TCP_NODELAY
flag
=
1
;
...
...
dlls/wininet/tests/http.c
View file @
f33f7a5d
...
...
@@ -4041,6 +4041,32 @@ static void test_InternetCloseHandle(void)
closetest_req
,
res
,
GetLastError
());
}
static
void
test_connection_failure
(
void
)
{
HINTERNET
session
,
connect
,
request
;
DWORD
error
;
BOOL
ret
;
session
=
InternetOpenA
(
"winetest"
,
INTERNET_OPEN_TYPE_PRECONFIG
,
NULL
,
NULL
,
0
);
ok
(
session
!=
NULL
,
"failed to get session handle
\n
"
);
connect
=
InternetConnectA
(
session
,
"localhost"
,
1
,
NULL
,
NULL
,
INTERNET_SERVICE_HTTP
,
0
,
0
);
ok
(
connect
!=
NULL
,
"failed to get connection handle
\n
"
);
request
=
HttpOpenRequestA
(
connect
,
NULL
,
"/"
,
NULL
,
NULL
,
NULL
,
0
,
0
);
ok
(
request
!=
NULL
,
"failed to get request handle
\n
"
);
SetLastError
(
0xdeadbeef
);
ret
=
HttpSendRequest
(
request
,
NULL
,
0
,
NULL
,
0
);
error
=
GetLastError
();
ok
(
!
ret
,
"unexpected success
\n
"
);
ok
(
error
==
ERROR_INTERNET_CANNOT_CONNECT
,
"wrong error %u
\n
"
,
error
);
InternetCloseHandle
(
request
);
InternetCloseHandle
(
connect
);
InternetCloseHandle
(
session
);
}
static
void
init_status_tests
(
void
)
{
memset
(
expect
,
0
,
sizeof
(
expect
));
...
...
@@ -4117,4 +4143,5 @@ START_TEST(http)
InternetReadFile_chunked_test
();
HttpSendRequestEx_test
();
InternetReadFile_test
(
INTERNET_FLAG_ASYNC
,
&
test_data
[
3
]);
test_connection_failure
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment