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
ae430f93
Commit
ae430f93
authored
Oct 29, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 30, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Store handle in WININETHANDLEHEADER and use it in SendCallback.
parent
957516f8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
27 deletions
+6
-27
internet.c
dlls/wininet/internet.c
+3
-16
internet.h
dlls/wininet/internet.h
+1
-0
utility.c
dlls/wininet/utility.c
+2
-11
No files found.
dlls/wininet/internet.c
View file @
ae430f93
...
...
@@ -151,26 +151,13 @@ HINTERNET WININET_AllocHandle( LPWININETHANDLEHEADER info )
end:
LeaveCriticalSection
(
&
WININET_cs
);
return
(
HINTERNET
)
(
handle
+
1
);
return
info
->
hInternet
=
(
HINTERNET
)
(
handle
+
1
);
}
HINTERNET
WININET_FindHandle
(
LPWININETHANDLEHEADER
info
)
{
UINT
i
,
handle
=
0
;
EnterCriticalSection
(
&
WININET_cs
);
for
(
i
=
0
;
i
<
WININET_dwMaxHandles
;
i
++
)
{
if
(
info
==
WININET_Handles
[
i
]
)
{
WININET_AddRef
(
info
);
handle
=
i
+
1
;
break
;
}
}
LeaveCriticalSection
(
&
WININET_cs
);
return
(
HINTERNET
)
handle
;
WININET_AddRef
(
info
);
return
info
->
hInternet
;
}
LPWININETHANDLEHEADER
WININET_AddRef
(
LPWININETHANDLEHEADER
info
)
...
...
dlls/wininet/internet.h
View file @
ae430f93
...
...
@@ -139,6 +139,7 @@ typedef void (*WININET_object_destructor)( LPWININETHANDLEHEADER );
struct
_WININETHANDLEHEADER
{
WH_TYPE
htype
;
HINTERNET
hInternet
;
DWORD
dwFlags
;
DWORD
dwContext
;
DWORD
dwError
;
...
...
dlls/wininet/utility.c
View file @
ae430f93
...
...
@@ -214,7 +214,6 @@ VOID INTERNET_SendCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext,
DWORD
dwInternetStatus
,
LPVOID
lpvStatusInfo
,
DWORD
dwStatusInfoLength
)
{
HINTERNET
hHttpSession
;
LPVOID
lpvNewInfo
=
NULL
;
if
(
!
hdr
->
lpfnStatusCB
)
...
...
@@ -225,12 +224,6 @@ VOID INTERNET_SendCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext,
if
(
!
dwContext
)
return
;
hHttpSession
=
WININET_FindHandle
(
hdr
);
if
(
!
hHttpSession
)
{
TRACE
(
" Could not convert header '%p' into a handle !
\n
"
,
hdr
);
return
;
}
lpvNewInfo
=
lpvStatusInfo
;
if
(
hdr
->
dwInternalFlags
&
INET_CALLBACKW
)
{
switch
(
dwInternetStatus
)
{
...
...
@@ -249,18 +242,16 @@ VOID INTERNET_SendCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext,
}
TRACE
(
" callback(%p) (%p (%p), %08x, %d (%s), %p, %d)
\n
"
,
hdr
->
lpfnStatusCB
,
h
HttpSession
,
hdr
,
dwContext
,
dwInternetStatus
,
get_callback_name
(
dwInternetStatus
),
hdr
->
lpfnStatusCB
,
h
dr
->
hInternet
,
hdr
,
dwContext
,
dwInternetStatus
,
get_callback_name
(
dwInternetStatus
),
lpvNewInfo
,
dwStatusInfoLength
);
hdr
->
lpfnStatusCB
(
h
HttpSession
,
dwContext
,
dwInternetStatus
,
hdr
->
lpfnStatusCB
(
h
dr
->
hInternet
,
dwContext
,
dwInternetStatus
,
lpvNewInfo
,
dwStatusInfoLength
);
TRACE
(
" end callback().
\n
"
);
if
(
lpvNewInfo
!=
lpvStatusInfo
)
HeapFree
(
GetProcessHeap
(),
0
,
lpvNewInfo
);
WININET_Release
(
hdr
);
}
...
...
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