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
c33a51ea
Commit
c33a51ea
authored
Oct 20, 2007
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 22, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Separate ftp session destruction from closing connections.
parent
add663fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
18 deletions
+32
-18
ftp.c
dlls/wininet/ftp.c
+32
-18
No files found.
dlls/wininet/ftp.c
View file @
c33a51ea
...
...
@@ -123,6 +123,7 @@ static const WCHAR szNoAccount[] = {'n','o','a','c','c','o','u','n','t','\0'};
static
void
FTP_CloseFileTransferHandle
(
LPWININETHANDLEHEADER
hdr
);
static
void
FTP_CloseSessionHandle
(
LPWININETHANDLEHEADER
hdr
);
static
void
FTP_CloseConnection
(
LPWININETHANDLEHEADER
hdr
);
static
void
FTP_CloseFindNextHandle
(
LPWININETHANDLEHEADER
hdr
);
static
BOOL
FTP_SendCommand
(
INT
nSocket
,
FTP_COMMAND
ftpCmd
,
LPCWSTR
lpszParam
,
INTERNET_STATUS_CALLBACK
lpfnStatusCB
,
LPWININETHANDLEHEADER
hdr
,
DWORD_PTR
dwContext
);
...
...
@@ -1895,10 +1896,7 @@ HINTERNET FTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName,
lpwfs
->
hdr
.
dwContext
=
dwContext
;
lpwfs
->
hdr
.
dwInternalFlags
=
dwInternalFlags
;
lpwfs
->
hdr
.
dwRefCount
=
1
;
/* FIXME: Native sends INTERNET_STATUS_CLOSING_CONNECTION and
* INTERNET_STATUS_CONNECTION_CLOSED, need an equivalent FTP_CloseConnection
* function */
lpwfs
->
hdr
.
close_connection
=
NULL
;
lpwfs
->
hdr
.
close_connection
=
FTP_CloseConnection
;
lpwfs
->
hdr
.
destroy
=
FTP_CloseSessionHandle
;
lpwfs
->
hdr
.
lpfnStatusCB
=
hIC
->
hdr
.
lpfnStatusCB
;
lpwfs
->
download_in_progress
=
NULL
;
...
...
@@ -2823,16 +2821,41 @@ recv_end:
return
(
nRC
!=
-
1
);
}
/***********************************************************************
* FTP_CloseConnection (internal)
*
* Close connections
*/
static
void
FTP_CloseConnection
(
LPWININETHANDLEHEADER
hdr
)
{
LPWININETFTPSESSIONW
lpwfs
=
(
LPWININETFTPSESSIONW
)
hdr
;
TRACE
(
"
\n
"
);
SendAsyncCallback
(
&
lpwfs
->
hdr
,
lpwfs
->
hdr
.
dwContext
,
INTERNET_STATUS_CLOSING_CONNECTION
,
0
,
0
);
if
(
lpwfs
->
download_in_progress
!=
NULL
)
lpwfs
->
download_in_progress
->
session_deleted
=
TRUE
;
if
(
lpwfs
->
sndSocket
!=
-
1
)
closesocket
(
lpwfs
->
sndSocket
);
if
(
lpwfs
->
lstnSocket
!=
-
1
)
closesocket
(
lpwfs
->
lstnSocket
);
if
(
lpwfs
->
pasvSocket
!=
-
1
)
closesocket
(
lpwfs
->
pasvSocket
);
SendAsyncCallback
(
&
lpwfs
->
hdr
,
lpwfs
->
hdr
.
dwContext
,
INTERNET_STATUS_CONNECTION_CLOSED
,
0
,
0
);
}
/***********************************************************************
* FTP_CloseSessionHandle (internal)
*
* Deallocate session handle
*
* RETURNS
* TRUE on success
* FALSE on failure
*
*/
static
void
FTP_CloseSessionHandle
(
LPWININETHANDLEHEADER
hdr
)
{
...
...
@@ -2842,15 +2865,6 @@ static void FTP_CloseSessionHandle(LPWININETHANDLEHEADER hdr)
WININET_Release
(
&
lpwfs
->
lpAppInfo
->
hdr
);
if
(
lpwfs
->
download_in_progress
!=
NULL
)
lpwfs
->
download_in_progress
->
session_deleted
=
TRUE
;
if
(
lpwfs
->
sndSocket
!=
-
1
)
closesocket
(
lpwfs
->
sndSocket
);
if
(
lpwfs
->
lstnSocket
!=
-
1
)
closesocket
(
lpwfs
->
lstnSocket
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwfs
->
lpszPassword
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwfs
->
lpszUserName
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwfs
);
...
...
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