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
728e5fa5
Commit
728e5fa5
authored
Sep 20, 2007
by
Misha Koshelev
Committed by
Alexandre Julliard
Sep 21, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Track child handles, free all child handles on WININET_FreeHandle as native.
parent
eecc57f1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
4 deletions
+22
-4
cookie.c
dlls/wininet/cookie.c
+0
-2
ftp.c
dlls/wininet/ftp.c
+3
-0
http.c
dlls/wininet/http.c
+2
-0
internet.c
dlls/wininet/internet.c
+14
-1
internet.h
dlls/wininet/internet.h
+3
-0
urlcache.c
dlls/wininet/urlcache.c
+0
-1
No files found.
dlls/wininet/cookie.c
View file @
728e5fa5
...
...
@@ -39,8 +39,6 @@
#include "wine/debug.h"
#include "internet.h"
#include "wine/list.h"
#define RESPONSE_TIMEOUT 30
/* FROM internet.c */
...
...
dlls/wininet/ftp.c
View file @
728e5fa5
...
...
@@ -1128,6 +1128,7 @@ HINTERNET FTP_FtpOpenFileW(LPWININETFTPSESSIONW lpwfs,
WININET_AddRef
(
&
lpwfs
->
hdr
);
lpwh
->
lpFtpSession
=
lpwfs
;
list_add_head
(
&
lpwfs
->
hdr
.
children
,
&
lpwh
->
hdr
.
entry
);
handle
=
WININET_AllocHandle
(
&
lpwh
->
hdr
);
if
(
!
handle
)
...
...
@@ -1904,6 +1905,7 @@ HINTERNET FTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName,
WININET_AddRef
(
&
hIC
->
hdr
);
lpwfs
->
lpAppInfo
=
hIC
;
list_add_head
(
&
hIC
->
hdr
.
children
,
&
lpwfs
->
hdr
.
entry
);
handle
=
WININET_AllocHandle
(
&
lpwfs
->
hdr
);
if
(
!
handle
)
...
...
@@ -3012,6 +3014,7 @@ static HINTERNET FTP_ReceiveFileList(LPWININETFTPSESSIONW lpwfs, INT nSocket, LP
WININET_AddRef
(
&
lpwfs
->
hdr
);
lpwfn
->
lpFtpSession
=
lpwfs
;
list_add_head
(
&
lpwfs
->
hdr
.
children
,
&
lpwfn
->
hdr
.
entry
);
handle
=
WININET_AllocHandle
(
&
lpwfn
->
hdr
);
}
...
...
dlls/wininet/http.c
View file @
728e5fa5
...
...
@@ -1371,6 +1371,7 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs,
WININET_AddRef
(
&
lpwhs
->
hdr
);
lpwhr
->
lpHttpSession
=
lpwhs
;
list_add_head
(
&
lpwhs
->
hdr
.
children
,
&
lpwhr
->
hdr
.
entry
);
handle
=
WININET_AllocHandle
(
&
lpwhr
->
hdr
);
if
(
NULL
==
handle
)
...
...
@@ -2824,6 +2825,7 @@ HINTERNET HTTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName,
WININET_AddRef
(
&
hIC
->
hdr
);
lpwhs
->
lpAppInfo
=
hIC
;
list_add_head
(
&
hIC
->
hdr
.
children
,
&
lpwhs
->
hdr
.
entry
);
handle
=
WININET_AllocHandle
(
&
lpwhs
->
hdr
);
if
(
NULL
==
handle
)
...
...
dlls/wininet/internet.c
View file @
728e5fa5
...
...
@@ -105,6 +105,8 @@ HINTERNET WININET_AllocHandle( LPWININETHANDLEHEADER info )
LPWININETHANDLEHEADER
*
p
;
UINT
handle
=
0
,
num
;
list_init
(
&
info
->
children
);
EnterCriticalSection
(
&
WININET_cs
);
if
(
!
WININET_dwMaxHandles
)
{
...
...
@@ -182,6 +184,8 @@ BOOL WININET_Release( LPWININETHANDLEHEADER info )
INTERNET_STATUS_HANDLE_CLOSING
,
&
info
->
hInternet
,
sizeof
(
HINTERNET
));
TRACE
(
"destroying object %p
\n
"
,
info
);
if
(
info
->
htype
!=
WH_HINIT
)
list_remove
(
&
info
->
entry
);
info
->
destroy
(
info
);
}
return
TRUE
;
...
...
@@ -191,7 +195,7 @@ BOOL WININET_FreeHandle( HINTERNET hinternet )
{
BOOL
ret
=
FALSE
;
UINT
handle
=
(
UINT
)
hinternet
;
LPWININETHANDLEHEADER
info
=
NULL
;
LPWININETHANDLEHEADER
info
=
NULL
,
child
,
next
;
EnterCriticalSection
(
&
WININET_cs
);
...
...
@@ -212,7 +216,16 @@ BOOL WININET_FreeHandle( HINTERNET hinternet )
LeaveCriticalSection
(
&
WININET_cs
);
if
(
info
)
{
/* Free all children as native does */
LIST_FOR_EACH_ENTRY_SAFE
(
child
,
next
,
&
info
->
children
,
WININETHANDLEHEADER
,
entry
)
{
TRACE
(
"freeing child handle %d for parent handle %d
\n
"
,
(
UINT
)
child
->
hInternet
,
handle
+
1
);
WININET_FreeHandle
(
child
->
hInternet
);
}
WININET_Release
(
info
);
}
return
ret
;
}
...
...
dlls/wininet/internet.h
View file @
728e5fa5
...
...
@@ -28,6 +28,7 @@
#endif
#include "wine/unicode.h"
#include "wine/list.h"
#include <time.h>
#ifdef HAVE_NETDB_H
...
...
@@ -149,6 +150,8 @@ struct _WININETHANDLEHEADER
WININET_object_function
close_connection
;
WININET_object_function
destroy
;
INTERNET_STATUS_CALLBACK
lpfnStatusCB
;
struct
list
entry
;
struct
list
children
;
};
...
...
dlls/wininet/urlcache.c
View file @
728e5fa5
...
...
@@ -46,7 +46,6 @@
#include "shlobj.h"
#include "wine/unicode.h"
#include "wine/list.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
wininet
);
...
...
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