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
5270b429
Commit
5270b429
authored
Oct 31, 2007
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 01, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Correct several ftp server response to error code mappings.
parent
83fd17f2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
51 deletions
+34
-51
ftp.c
dlls/wininet/ftp.c
+30
-39
ftp.c
dlls/wininet/tests/ftp.c
+4
-12
No files found.
dlls/wininet/ftp.c
View file @
5270b429
...
...
@@ -3437,45 +3437,36 @@ static DWORD FTP_SetResponseError(DWORD dwResponse)
switch
(
dwResponse
)
{
case
421
:
/* Service not available - Server may be shutting down. */
dwCode
=
ERROR_INTERNET_EXTENDED_ERROR
;
break
;
case
425
:
/* Cannot open data connection. */
dwCode
=
ERROR_INTERNET_CANNOT_CONNECT
;
break
;
case
426
:
/* Connection closed, transer aborted. */
dwCode
=
ERROR_INTERNET_CONNECTION_ABORTED
;
break
;
case
500
:
/* Syntax error. Command unrecognized. */
case
501
:
/* Syntax error. Error in parameters or arguments. */
dwCode
=
ERROR_INTERNET_INCORRECT_FORMAT
;
break
;
case
530
:
/* Not logged in. Login incorrect. */
dwCode
=
ERROR_INTERNET_LOGIN_FAILURE
;
break
;
case
550
:
/* File action not taken. File not found or no access. */
dwCode
=
ERROR_INTERNET_ITEM_NOT_FOUND
;
break
;
case
450
:
/* File action not taken. File may be busy. */
case
451
:
/* Action aborted. Server error. */
case
452
:
/* Action not taken. Insufficient storage space on server. */
case
502
:
/* Command not implemented. */
case
503
:
/* Bad sequence of commands. */
case
504
:
/* Command not implemented for that parameter. */
case
532
:
/* Need account for storing files */
case
551
:
/* Requested action aborted. Page type unknown */
case
552
:
/* Action aborted. Exceeded storage allocation */
case
553
:
/* Action not taken. File name not allowed. */
default:
dwCode
=
ERROR_INTERNET_EXTENDED_ERROR
;
break
;
case
425
:
/* Cannot open data connection. */
dwCode
=
ERROR_INTERNET_CANNOT_CONNECT
;
break
;
case
426
:
/* Connection closed, transer aborted. */
dwCode
=
ERROR_INTERNET_CONNECTION_ABORTED
;
break
;
case
530
:
/* Not logged in. Login incorrect. */
dwCode
=
ERROR_INTERNET_LOGIN_FAILURE
;
break
;
case
421
:
/* Service not available - Server may be shutting down. */
case
450
:
/* File action not taken. File may be busy. */
case
451
:
/* Action aborted. Server error. */
case
452
:
/* Action not taken. Insufficient storage space on server. */
case
500
:
/* Syntax error. Command unrecognized. */
case
501
:
/* Syntax error. Error in parameters or arguments. */
case
502
:
/* Command not implemented. */
case
503
:
/* Bad sequence of commands. */
case
504
:
/* Command not implemented for that parameter. */
case
532
:
/* Need account for storing files */
case
550
:
/* File action not taken. File not found or no access. */
case
551
:
/* Requested action aborted. Page type unknown */
case
552
:
/* Action aborted. Exceeded storage allocation */
case
553
:
/* Action not taken. File name not allowed. */
default:
dwCode
=
ERROR_INTERNET_EXTENDED_ERROR
;
break
;
}
INTERNET_SetLastError
(
dwCode
);
...
...
dlls/wininet/tests/ftp.c
View file @
5270b429
...
...
@@ -125,7 +125,6 @@ static void test_createdir(HINTERNET hFtp, HINTERNET hConnect)
SetLastError
(
0xdeadbeef
);
bRet
=
FtpCreateDirectoryA
(
hFtp
,
"new_directory_deadbeef"
);
ok
(
bRet
==
FALSE
,
"Expected FtpCreateDirectoryA to fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INTERNET_EXTENDED_ERROR
,
"Expected ERROR_INTERNET_EXTENDED_ERROR, got %d
\n
"
,
GetLastError
());
...
...
@@ -165,7 +164,6 @@ static void test_deletefile(HINTERNET hFtp, HINTERNET hConnect)
SetLastError
(
0xdeadbeef
);
bRet
=
FtpDeleteFileA
(
hFtp
,
"non_existent_file_deadbeef"
);
ok
(
bRet
==
FALSE
,
"Expected FtpDeleteFileA to fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INTERNET_EXTENDED_ERROR
,
"Expected ERROR_INTERNET_EXTENDED_ERROR, got %d
\n
"
,
GetLastError
());
...
...
@@ -256,14 +254,13 @@ static void test_getfile(HINTERNET hFtp, HINTERNET hConnect)
SetLastError
(
0xdeadbeef
);
bRet
=
FtpGetFileA
(
hFtp
,
"should_be_non_existing_deadbeef"
,
"should_also_be_non_existing_deadbeef"
,
FALSE
,
FILE_ATTRIBUTE_NORMAL
,
FTP_TRANSFER_TYPE_UNKNOWN
,
0
);
ok
(
bRet
==
FALSE
,
"Expected FtpGetFileA to fail
\n
"
);
todo_wine
{
ok
(
GetLastError
()
==
ERROR_INTERNET_EXTENDED_ERROR
,
"Expected ERROR_INTERNET_EXTENDED_ERROR, got %d
\n
"
,
GetLastError
());
/* Currently Wine always creates the local file (even on failure) which is not correct, hence the test */
todo_wine
ok
(
GetFileAttributesA
(
"should_also_be_non_existing_deadbeef"
)
==
INVALID_FILE_ATTRIBUTES
,
"Local file should not have been created
\n
"
);
}
DeleteFileA
(
"should_also_be_non_existing_deadbeef"
);
/* Same call as the previous but now the local file does exists. Windows just removes the file if the call fails
...
...
@@ -278,14 +275,13 @@ static void test_getfile(HINTERNET hFtp, HINTERNET hConnect)
SetLastError
(
0xdeadbeef
);
bRet
=
FtpGetFileA
(
hFtp
,
"should_be_non_existing_deadbeef"
,
"should_also_be_non_existing_deadbeef"
,
FALSE
,
FILE_ATTRIBUTE_NORMAL
,
FTP_TRANSFER_TYPE_UNKNOWN
,
0
);
ok
(
bRet
==
FALSE
,
"Expected FtpGetFileA to fail
\n
"
);
todo_wine
{
ok
(
GetLastError
()
==
ERROR_INTERNET_EXTENDED_ERROR
,
"Expected ERROR_INTERNET_EXTENDED_ERROR, got %d
\n
"
,
GetLastError
());
/* Currently Wine always creates the local file (even on failure) which is not correct, hence the test */
todo_wine
ok
(
GetFileAttributesA
(
"should_also_be_non_existing_deadbeef"
)
==
INVALID_FILE_ATTRIBUTES
,
"Local file should not have been created
\n
"
);
}
DeleteFileA
(
"should_also_be_non_existing_deadbeef"
);
/* This one should succeed */
...
...
@@ -537,7 +533,6 @@ static void test_putfile(HINTERNET hFtp, HINTERNET hConnect)
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_INTERNET_EXTENDED_ERROR
,
"Expected ERROR_INTERNET_EXTENDED_ERROR, got %d
\n
"
,
GetLastError
());
...
...
@@ -587,7 +582,6 @@ static void test_removedir(HINTERNET hFtp, HINTERNET hConnect)
SetLastError
(
0xdeadbeef
);
bRet
=
FtpRemoveDirectoryA
(
hFtp
,
"should_be_non_existing_deadbeef_dir"
);
ok
(
bRet
==
FALSE
,
"Expected FtpRemoveDirectoryA to fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INTERNET_EXTENDED_ERROR
,
"Expected ERROR_INTERNET_EXTENDED_ERROR, got %d
\n
"
,
GetLastError
());
...
...
@@ -595,7 +589,6 @@ static void test_removedir(HINTERNET hFtp, HINTERNET hConnect)
SetLastError
(
0xdeadbeef
);
bRet
=
FtpRemoveDirectoryA
(
hFtp
,
"pub"
);
ok
(
bRet
==
FALSE
,
"Expected FtpRemoveDirectoryA to fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INTERNET_EXTENDED_ERROR
,
"Expected ERROR_INTERNET_EXTENDED_ERROR, got %d
\n
"
,
GetLastError
());
...
...
@@ -642,7 +635,6 @@ static void test_renamefile(HINTERNET hFtp, HINTERNET hConnect)
SetLastError
(
0xdeadbeef
);
bRet
=
FtpRenameFileA
(
hFtp
,
"should_be_non_existing_deadbeef"
,
"new"
);
ok
(
bRet
==
FALSE
,
"Expected FtpRenameFileA to fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INTERNET_EXTENDED_ERROR
,
"Expected ERROR_INTERNET_EXTENDED_ERROR, 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