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
e55531d6
Commit
e55531d6
authored
Oct 26, 2007
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 29, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Always return an error when a transfer is in progress.
parent
a5fba22a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
10 deletions
+56
-10
ftp.c
dlls/wininet/ftp.c
+56
-5
ftp.c
dlls/wininet/tests/ftp.c
+0
-5
No files found.
dlls/wininet/ftp.c
View file @
e55531d6
...
...
@@ -225,6 +225,12 @@ BOOL WINAPI FtpPutFileW(HINTERNET hConnect, LPCWSTR lpszLocalFile,
goto
lend
;
}
if
(
lpwfs
->
download_in_progress
!=
NULL
)
{
INTERNET_SetLastError
(
ERROR_FTP_TRANSFER_IN_PROGRESS
);
goto
lend
;
}
if
((
dwFlags
&
FTP_CONDITION_MASK
)
>
FTP_TRANSFER_TYPE_BINARY
)
{
INTERNET_SetLastError
(
ERROR_INVALID_PARAMETER
);
...
...
@@ -392,6 +398,12 @@ BOOL WINAPI FtpSetCurrentDirectoryW(HINTERNET hConnect, LPCWSTR lpszDirectory)
goto
lend
;
}
if
(
lpwfs
->
download_in_progress
!=
NULL
)
{
INTERNET_SetLastError
(
ERROR_FTP_TRANSFER_IN_PROGRESS
);
goto
lend
;
}
TRACE
(
"lpszDirectory(%s)
\n
"
,
debugstr_w
(
lpszDirectory
));
hIC
=
lpwfs
->
lpAppInfo
;
...
...
@@ -532,6 +544,12 @@ BOOL WINAPI FtpCreateDirectoryW(HINTERNET hConnect, LPCWSTR lpszDirectory)
goto
lend
;
}
if
(
lpwfs
->
download_in_progress
!=
NULL
)
{
INTERNET_SetLastError
(
ERROR_FTP_TRANSFER_IN_PROGRESS
);
goto
lend
;
}
if
(
!
lpszDirectory
)
{
INTERNET_SetLastError
(
ERROR_INVALID_PARAMETER
);
...
...
@@ -676,6 +694,12 @@ HINTERNET WINAPI FtpFindFirstFileW(HINTERNET hConnect,
goto
lend
;
}
if
(
lpwfs
->
download_in_progress
!=
NULL
)
{
INTERNET_SetLastError
(
ERROR_FTP_TRANSFER_IN_PROGRESS
);
goto
lend
;
}
hIC
=
lpwfs
->
lpAppInfo
;
if
(
hIC
->
hdr
.
dwFlags
&
INTERNET_FLAG_ASYNC
)
{
...
...
@@ -866,6 +890,12 @@ BOOL WINAPI FtpGetCurrentDirectoryW(HINTERNET hFtpSession, LPWSTR lpszCurrentDir
goto
lend
;
}
if
(
lpwfs
->
download_in_progress
!=
NULL
)
{
INTERNET_SetLastError
(
ERROR_FTP_TRANSFER_IN_PROGRESS
);
goto
lend
;
}
hIC
=
lpwfs
->
lpAppInfo
;
if
(
hIC
->
hdr
.
dwFlags
&
INTERNET_FLAG_ASYNC
)
{
...
...
@@ -1044,10 +1074,12 @@ HINTERNET WINAPI FtpOpenFileW(HINTERNET hFtpSession,
goto
lend
;
}
if
(
lpwfs
->
download_in_progress
!=
NULL
)
{
INTERNET_SetLastError
(
ERROR_FTP_TRANSFER_IN_PROGRESS
);
goto
lend
;
if
(
lpwfs
->
download_in_progress
!=
NULL
)
{
INTERNET_SetLastError
(
ERROR_FTP_TRANSFER_IN_PROGRESS
);
goto
lend
;
}
hIC
=
lpwfs
->
lpAppInfo
;
if
(
hIC
->
hdr
.
dwFlags
&
INTERNET_FLAG_ASYNC
)
{
...
...
@@ -1255,8 +1287,9 @@ BOOL WINAPI FtpGetFileW(HINTERNET hInternet, LPCWSTR lpszRemoteFile, LPCWSTR lps
goto
lend
;
}
if
(
lpwfs
->
download_in_progress
!=
NULL
)
{
INTERNET_SetLastError
(
ERROR_FTP_TRANSFER_IN_PROGRESS
);
if
(
lpwfs
->
download_in_progress
!=
NULL
)
{
INTERNET_SetLastError
(
ERROR_FTP_TRANSFER_IN_PROGRESS
);
goto
lend
;
}
...
...
@@ -1437,6 +1470,12 @@ BOOL WINAPI FtpDeleteFileW(HINTERNET hFtpSession, LPCWSTR lpszFileName)
goto
lend
;
}
if
(
lpwfs
->
download_in_progress
!=
NULL
)
{
INTERNET_SetLastError
(
ERROR_FTP_TRANSFER_IN_PROGRESS
);
goto
lend
;
}
if
(
!
lpszFileName
)
{
INTERNET_SetLastError
(
ERROR_INVALID_PARAMETER
);
...
...
@@ -1576,6 +1615,12 @@ BOOL WINAPI FtpRemoveDirectoryW(HINTERNET hFtpSession, LPCWSTR lpszDirectory)
goto
lend
;
}
if
(
lpwfs
->
download_in_progress
!=
NULL
)
{
INTERNET_SetLastError
(
ERROR_FTP_TRANSFER_IN_PROGRESS
);
goto
lend
;
}
if
(
!
lpszDirectory
)
{
INTERNET_SetLastError
(
ERROR_INVALID_PARAMETER
);
...
...
@@ -1720,6 +1765,12 @@ BOOL WINAPI FtpRenameFileW(HINTERNET hFtpSession, LPCWSTR lpszSrc, LPCWSTR lpszD
goto
lend
;
}
if
(
lpwfs
->
download_in_progress
!=
NULL
)
{
INTERNET_SetLastError
(
ERROR_FTP_TRANSFER_IN_PROGRESS
);
goto
lend
;
}
if
(
!
lpszSrc
||
!
lpszDest
)
{
INTERNET_SetLastError
(
ERROR_INVALID_PARAMETER
);
...
...
dlls/wininet/tests/ftp.c
View file @
e55531d6
...
...
@@ -496,14 +496,12 @@ static void test_openfile(void)
SetLastError
(
0xdeadbeef
);
bRet
=
FtpCreateDirectoryA
(
hFtp
,
"new_directory_deadbeef"
);
ok
(
bRet
==
FALSE
,
"Expected FtpCreateDirectoryA to fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_FTP_TRANSFER_IN_PROGRESS
,
"Expected ERROR_FTP_TRANSFER_IN_PROGRESS, got %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
bRet
=
FtpDeleteFileA
(
hFtp
,
"non_existent_file_deadbeef"
);
ok
(
bRet
==
FALSE
,
"Expected FtpDeleteFileA to fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_FTP_TRANSFER_IN_PROGRESS
,
"Expected ERROR_FTP_TRANSFER_IN_PROGRESS, got %d
\n
"
,
GetLastError
());
...
...
@@ -529,7 +527,6 @@ static void test_openfile(void)
SetLastError
(
0xdeadbeef
);
bRet
=
FtpPutFileA
(
hFtp
,
"now_existing_local"
,
"non_existing_remote"
,
FTP_TRANSFER_TYPE_UNKNOWN
,
0
);
ok
(
bRet
==
FALSE
,
"Expected FtpPutFileA to fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_FTP_TRANSFER_IN_PROGRESS
,
"Expected ERROR_FTP_TRANSFER_IN_PROGRESS, got %d
\n
"
,
GetLastError
());
DeleteFileA
(
"now_existing_local"
);
...
...
@@ -537,14 +534,12 @@ static void test_openfile(void)
SetLastError
(
0xdeadbeef
);
bRet
=
FtpRemoveDirectoryA
(
hFtp
,
"should_be_non_existing_deadbeef_dir"
);
ok
(
bRet
==
FALSE
,
"Expected FtpRemoveDirectoryA to fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_FTP_TRANSFER_IN_PROGRESS
,
"Expected ERROR_FTP_TRANSFER_IN_PROGRESS, got %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
bRet
=
FtpRenameFileA
(
hFtp
,
"should_be_non_existing_deadbeef"
,
"new"
);
ok
(
bRet
==
FALSE
,
"Expected FtpRenameFileA to fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_FTP_TRANSFER_IN_PROGRESS
,
"Expected ERROR_FTP_TRANSFER_IN_PROGRESS, got %d
\n
"
,
GetLastError
());
}
...
...
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