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
de2666fd
Commit
de2666fd
authored
Nov 29, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
Nov 29, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change all SendAsyncCallback calls into the synchronous
INTERNET_SendCallback where INTERNET_FLAG_ASYNC is already handled properly.
parent
a5cb9c55
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
50 deletions
+50
-50
http.c
dlls/wininet/http.c
+50
-50
No files found.
dlls/wininet/http.c
View file @
de2666fd
...
...
@@ -1107,9 +1107,9 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs,
HeapFree
(
GetProcessHeap
(),
0
,
lpszUrl
);
SendAsync
Callback
(
&
lpwhs
->
hdr
,
dwContext
,
INTERNET_STATUS_HANDLE_CREATED
,
&
handle
,
sizeof
(
handle
));
INTERNET_Send
Callback
(
&
lpwhs
->
hdr
,
dwContext
,
INTERNET_STATUS_HANDLE_CREATED
,
&
handle
,
sizeof
(
handle
));
/*
* A STATUS_REQUEST_COMPLETE is NOT sent here as per my tests on windows
...
...
@@ -1118,10 +1118,10 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs,
/*
* According to my tests. The name is not resolved until a request is Opened
*/
SendAsync
Callback
(
&
lpwhr
->
hdr
,
dwContext
,
INTERNET_STATUS_RESOLVING_NAME
,
lpwhs
->
lpszServerName
,
strlenW
(
lpwhs
->
lpszServerName
)
+
1
);
INTERNET_Send
Callback
(
&
lpwhr
->
hdr
,
dwContext
,
INTERNET_STATUS_RESOLVING_NAME
,
lpwhs
->
lpszServerName
,
strlenW
(
lpwhs
->
lpszServerName
)
+
1
);
if
(
!
GetAddress
(
lpwhs
->
lpszServerName
,
lpwhs
->
nServerPort
,
&
lpwhs
->
socketAddress
))
...
...
@@ -1132,10 +1132,10 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs,
goto
lend
;
}
SendAsync
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_NAME_RESOLVED
,
&
(
lpwhs
->
socketAddress
),
sizeof
(
struct
sockaddr_in
));
INTERNET_Send
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_NAME_RESOLVED
,
&
(
lpwhs
->
socketAddress
),
sizeof
(
struct
sockaddr_in
));
lend:
if
(
lpwhr
)
...
...
@@ -1878,10 +1878,10 @@ static BOOL HTTP_HandleRedirect(LPWININETHTTPREQW lpwhr, LPCWSTR lpszUrl, LPCWST
lpwhs
->
lpszUserName
=
WININET_strdupW
(
userName
);
lpwhs
->
nServerPort
=
urlComponents
.
nPort
;
SendAsync
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_RESOLVING_NAME
,
lpwhs
->
lpszServerName
,
strlenW
(
lpwhs
->
lpszServerName
)
+
1
);
INTERNET_Send
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_RESOLVING_NAME
,
lpwhs
->
lpszServerName
,
strlenW
(
lpwhs
->
lpszServerName
)
+
1
);
if
(
!
GetAddress
(
lpwhs
->
lpszServerName
,
lpwhs
->
nServerPort
,
&
lpwhs
->
socketAddress
))
...
...
@@ -1892,10 +1892,10 @@ static BOOL HTTP_HandleRedirect(LPWININETHTTPREQW lpwhr, LPCWSTR lpszUrl, LPCWST
StrCatW
(
path
,
extra
);
SendAsync
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_NAME_RESOLVED
,
&
(
lpwhs
->
socketAddress
),
sizeof
(
struct
sockaddr_in
));
INTERNET_Send
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_NAME_RESOLVED
,
&
(
lpwhs
->
socketAddress
),
sizeof
(
struct
sockaddr_in
));
}
...
...
@@ -2068,18 +2068,18 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
ascii_req
[
len
]
=
0
;
TRACE
(
"full request -> %s
\n
"
,
debugstr_a
(
ascii_req
)
);
SendAsync
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_SENDING_REQUEST
,
NULL
,
0
);
INTERNET_Send
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_SENDING_REQUEST
,
NULL
,
0
);
NETCON_send
(
&
lpwhr
->
netConnection
,
ascii_req
,
len
,
0
,
&
cnt
);
HeapFree
(
GetProcessHeap
(),
0
,
ascii_req
);
SendAsync
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_REQUEST_SENT
,
&
len
,
sizeof
(
DWORD
));
INTERNET_Send
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_REQUEST_SENT
,
&
len
,
sizeof
(
DWORD
));
SendAsync
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_RECEIVING_RESPONSE
,
NULL
,
0
);
INTERNET_Send
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_RECEIVING_RESPONSE
,
NULL
,
0
);
if
(
cnt
<
0
)
goto
lend
;
...
...
@@ -2088,9 +2088,9 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
if
(
responseLen
)
bSuccess
=
TRUE
;
SendAsync
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_RESPONSE_RECEIVED
,
&
responseLen
,
sizeof
(
DWORD
));
INTERNET_Send
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_RESPONSE_RECEIVED
,
&
responseLen
,
sizeof
(
DWORD
));
/* process headers here. Is this right? */
HTTP_ProcessHeaders
(
lpwhr
);
...
...
@@ -2114,9 +2114,9 @@ lend:
dwIndex
=
0
;
if
(
HTTP_HttpQueryInfoW
(
lpwhr
,
HTTP_QUERY_LOCATION
,
szNewLocation
,
&
dwBufferSize
,
&
dwIndex
))
{
SendAsync
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_REDIRECT
,
szNewLocation
,
dwBufferSize
);
INTERNET_Send
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_REDIRECT
,
szNewLocation
,
dwBufferSize
);
return
HTTP_HandleRedirect
(
lpwhr
,
szNewLocation
,
lpszHeaders
,
dwHeaderLength
,
lpOptional
,
dwOptionalLength
);
}
...
...
@@ -2127,9 +2127,9 @@ lend:
iar
.
dwResult
=
(
DWORD
)
bSuccess
;
iar
.
dwError
=
bSuccess
?
ERROR_SUCCESS
:
INTERNET_GetLastError
();
SendAsync
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_REQUEST_COMPLETE
,
&
iar
,
sizeof
(
INTERNET_ASYNC_RESULT
));
INTERNET_Send
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_REQUEST_COMPLETE
,
&
iar
,
sizeof
(
INTERNET_ASYNC_RESULT
));
TRACE
(
"<--
\n
"
);
return
bSuccess
;
...
...
@@ -2208,9 +2208,9 @@ HINTERNET HTTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName,
/* Don't send a handle created callback if this handle was created with InternetOpenUrl */
if
(
!
(
lpwhs
->
hdr
.
dwInternalFlags
&
INET_OPENURL
))
{
SendAsync
Callback
(
&
hIC
->
hdr
,
dwContext
,
INTERNET_STATUS_HANDLE_CREATED
,
&
handle
,
sizeof
(
handle
));
INTERNET_Send
Callback
(
&
hIC
->
hdr
,
dwContext
,
INTERNET_STATUS_HANDLE_CREATED
,
&
handle
,
sizeof
(
handle
));
}
bSuccess
=
TRUE
;
...
...
@@ -2257,10 +2257,10 @@ static BOOL HTTP_OpenConnection(LPWININETHTTPREQW lpwhr)
lpwhs
=
(
LPWININETHTTPSESSIONW
)
lpwhr
->
hdr
.
lpwhparent
;
hIC
=
(
LPWININETAPPINFOW
)
lpwhs
->
hdr
.
lpwhparent
;
SendAsync
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_CONNECTING_TO_SERVER
,
&
(
lpwhs
->
socketAddress
),
sizeof
(
struct
sockaddr_in
));
INTERNET_Send
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_CONNECTING_TO_SERVER
,
&
(
lpwhs
->
socketAddress
),
sizeof
(
struct
sockaddr_in
));
if
(
!
NETCON_create
(
&
lpwhr
->
netConnection
,
lpwhs
->
socketAddress
.
sin_family
,
SOCK_STREAM
,
0
))
...
...
@@ -2294,10 +2294,10 @@ static BOOL HTTP_OpenConnection(LPWININETHTTPREQW lpwhr)
}
}
SendAsync
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_CONNECTED_TO_SERVER
,
&
(
lpwhs
->
socketAddress
),
sizeof
(
struct
sockaddr_in
));
INTERNET_Send
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_CONNECTED_TO_SERVER
,
&
(
lpwhs
->
socketAddress
),
sizeof
(
struct
sockaddr_in
));
bSuccess
=
TRUE
;
...
...
@@ -2885,16 +2885,16 @@ static VOID HTTP_CloseConnection(LPWININETHTTPREQW lpwhr)
lpwhs
=
(
LPWININETHTTPSESSIONW
)
lpwhr
->
hdr
.
lpwhparent
;
hIC
=
(
LPWININETAPPINFOW
)
lpwhs
->
hdr
.
lpwhparent
;
SendAsync
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_CLOSING_CONNECTION
,
0
,
0
);
INTERNET_Send
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_CLOSING_CONNECTION
,
0
,
0
);
if
(
NETCON_connected
(
&
lpwhr
->
netConnection
))
{
NETCON_close
(
&
lpwhr
->
netConnection
);
}
SendAsync
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_CONNECTION_CLOSED
,
0
,
0
);
INTERNET_Send
Callback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_CONNECTION_CLOSED
,
0
,
0
);
}
...
...
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