Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
96bf72f2
Commit
96bf72f2
authored
Sep 03, 2008
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 03, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Add status notification tests. Make them pass.
parent
a74b52cf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
5 deletions
+12
-5
request.c
dlls/winhttp/request.c
+8
-4
session.c
dlls/winhttp/session.c
+3
-1
Makefile.in
dlls/winhttp/tests/Makefile.in
+1
-0
notification.c
dlls/winhttp/tests/notification.c
+0
-0
No files found.
dlls/winhttp/request.c
View file @
96bf72f2
...
...
@@ -674,14 +674,18 @@ static BOOL open_connection( request_t *request )
WCHAR
*
addressW
;
if
(
netconn_connected
(
&
request
->
netconn
))
return
TRUE
;
connect
=
request
->
connect
;
if
(
!
netconn_resolve
(
connect
->
servername
,
connect
->
serverport
,
&
connect
->
sockaddr
))
return
FALSE
;
send_callback
(
&
request
->
hdr
,
WINHTTP_CALLBACK_STATUS_RESOLVING_NAME
,
connect
->
servername
,
strlenW
(
connect
->
servername
)
+
1
);
if
(
!
netconn_resolve
(
connect
->
servername
,
connect
->
serverport
,
&
connect
->
sockaddr
))
return
FALSE
;
inet_ntop
(
connect
->
sockaddr
.
sin_family
,
&
connect
->
sockaddr
.
sin_addr
,
address
,
sizeof
(
address
)
);
TRACE
(
"connecting to %s:%u
\n
"
,
address
,
ntohs
(
connect
->
sockaddr
.
sin_port
));
addressW
=
strdupAW
(
address
);
send_callback
(
&
request
->
hdr
,
WINHTTP_CALLBACK_STATUS_NAME_RESOLVED
,
addressW
,
strlenW
(
addressW
)
+
1
);
TRACE
(
"connecting to %s:%u
\n
"
,
address
,
ntohs
(
connect
->
sockaddr
.
sin_port
));
send_callback
(
&
request
->
hdr
,
WINHTTP_CALLBACK_STATUS_CONNECTING_TO_SERVER
,
addressW
,
0
);
if
(
!
netconn_create
(
&
request
->
netconn
,
connect
->
sockaddr
.
sin_family
,
SOCK_STREAM
,
0
))
...
...
@@ -702,7 +706,7 @@ static BOOL open_connection( request_t *request )
return
FALSE
;
}
send_callback
(
&
request
->
hdr
,
WINHTTP_CALLBACK_STATUS_CONNECTED_TO_SERVER
,
addressW
,
0
);
send_callback
(
&
request
->
hdr
,
WINHTTP_CALLBACK_STATUS_CONNECTED_TO_SERVER
,
addressW
,
strlenW
(
addressW
)
+
1
);
heap_free
(
addressW
);
return
TRUE
;
...
...
dlls/winhttp/session.c
View file @
96bf72f2
...
...
@@ -38,7 +38,7 @@ void set_last_error( DWORD error )
void
send_callback
(
object_header_t
*
hdr
,
DWORD
status
,
LPVOID
info
,
DWORD
buflen
)
{
TRACE
(
"%p,
%u
, %p, %u
\n
"
,
hdr
,
status
,
info
,
buflen
);
TRACE
(
"%p,
0x%08x
, %p, %u
\n
"
,
hdr
,
status
,
info
,
buflen
);
if
(
hdr
->
notify_mask
&
status
)
hdr
->
callback
(
hdr
->
handle
,
hdr
->
context
,
status
,
info
,
buflen
);
}
...
...
@@ -170,6 +170,7 @@ HINTERNET WINAPI WinHttpConnect( HINTERNET hsession, LPCWSTR server, INTERNET_PO
connect
->
hdr
.
flags
=
session
->
hdr
.
flags
;
connect
->
hdr
.
callback
=
session
->
hdr
.
callback
;
connect
->
hdr
.
notify_mask
=
session
->
hdr
.
notify_mask
;
connect
->
hdr
.
context
=
session
->
hdr
.
context
;
addref_object
(
&
session
->
hdr
);
connect
->
session
=
session
;
...
...
@@ -261,6 +262,7 @@ HINTERNET WINAPI WinHttpOpenRequest( HINTERNET hconnect, LPCWSTR verb, LPCWSTR o
request
->
hdr
.
flags
=
flags
;
request
->
hdr
.
callback
=
connect
->
hdr
.
callback
;
request
->
hdr
.
notify_mask
=
connect
->
hdr
.
notify_mask
;
request
->
hdr
.
context
=
connect
->
hdr
.
context
;
addref_object
(
&
connect
->
hdr
);
request
->
connect
=
connect
;
...
...
dlls/winhttp/tests/Makefile.in
View file @
96bf72f2
...
...
@@ -6,6 +6,7 @@ TESTDLL = winhttp.dll
IMPORTS
=
winhttp kernel32
CTESTS
=
\
notification.c
\
winhttp.c
@MAKE_TEST_RULES@
...
...
dlls/winhttp/tests/notification.c
0 → 100644
View file @
96bf72f2
This diff is collapsed.
Click to expand it.
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