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
88ac3a38
Commit
88ac3a38
authored
Dec 21, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Return error directly from INTERNET_AsyncCall.
parent
8b805e48
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
13 deletions
+20
-13
ftp.c
dlls/wininet/ftp.c
+15
-8
internet.c
dlls/wininet/internet.c
+4
-4
internet.h
dlls/wininet/internet.h
+1
-1
No files found.
dlls/wininet/ftp.c
View file @
88ac3a38
...
...
@@ -217,6 +217,13 @@ static BOOL FTP_FtpGetFileW(ftp_session_t*, LPCWSTR lpszRemoteFile, LPCWSTR lpsz
BOOL
fFailIfExists
,
DWORD
dwLocalFlagsAttribute
,
DWORD
dwInternetFlags
,
DWORD_PTR
dwContext
);
/* A temporary helper until we get rid of INTERNET_GetLastError calls */
static
BOOL
res_to_le
(
DWORD
res
)
{
if
(
res
!=
ERROR_SUCCESS
)
INTERNET_SetLastError
(
res
);
return
res
==
ERROR_SUCCESS
;
}
/***********************************************************************
* FtpPutFileA (WININET.@)
...
...
@@ -319,7 +326,7 @@ BOOL WINAPI FtpPutFileW(HINTERNET hConnect, LPCWSTR lpszLocalFile,
req
->
dwFlags
=
dwFlags
;
req
->
dwContext
=
dwContext
;
r
=
INTERNET_AsyncCall
(
&
workRequest
);
r
=
res_to_le
(
INTERNET_AsyncCall
(
&
workRequest
)
);
}
else
{
...
...
@@ -489,7 +496,7 @@ BOOL WINAPI FtpSetCurrentDirectoryW(HINTERNET hConnect, LPCWSTR lpszDirectory)
req
=
&
workRequest
.
u
.
FtpSetCurrentDirectoryW
;
req
->
lpszDirectory
=
heap_strdupW
(
lpszDirectory
);
r
=
INTERNET_AsyncCall
(
&
workRequest
);
r
=
res_to_le
(
INTERNET_AsyncCall
(
&
workRequest
)
);
}
else
{
...
...
@@ -639,7 +646,7 @@ BOOL WINAPI FtpCreateDirectoryW(HINTERNET hConnect, LPCWSTR lpszDirectory)
req
=
&
workRequest
.
u
.
FtpCreateDirectoryW
;
req
->
lpszDirectory
=
heap_strdupW
(
lpszDirectory
);
r
=
INTERNET_AsyncCall
(
&
workRequest
);
r
=
res_to_le
(
INTERNET_AsyncCall
(
&
workRequest
)
);
}
else
{
...
...
@@ -1000,7 +1007,7 @@ BOOL WINAPI FtpGetCurrentDirectoryW(HINTERNET hFtpSession, LPWSTR lpszCurrentDir
req
->
lpszDirectory
=
lpszCurrentDirectory
;
req
->
lpdwDirectory
=
lpdwCurrentDirectory
;
r
=
INTERNET_AsyncCall
(
&
workRequest
);
r
=
res_to_le
(
INTERNET_AsyncCall
(
&
workRequest
)
);
}
else
{
...
...
@@ -1658,7 +1665,7 @@ BOOL WINAPI FtpGetFileW(HINTERNET hInternet, LPCWSTR lpszRemoteFile, LPCWSTR lps
req
->
dwFlags
=
dwInternetFlags
;
req
->
dwContext
=
dwContext
;
r
=
INTERNET_AsyncCall
(
&
workRequest
);
r
=
res_to_le
(
INTERNET_AsyncCall
(
&
workRequest
)
);
}
else
{
...
...
@@ -1847,7 +1854,7 @@ BOOL WINAPI FtpDeleteFileW(HINTERNET hFtpSession, LPCWSTR lpszFileName)
req
=
&
workRequest
.
u
.
FtpDeleteFileW
;
req
->
lpszFilename
=
heap_strdupW
(
lpszFileName
);
r
=
INTERNET_AsyncCall
(
&
workRequest
);
r
=
res_to_le
(
INTERNET_AsyncCall
(
&
workRequest
)
);
}
else
{
...
...
@@ -1992,7 +1999,7 @@ BOOL WINAPI FtpRemoveDirectoryW(HINTERNET hFtpSession, LPCWSTR lpszDirectory)
req
=
&
workRequest
.
u
.
FtpRemoveDirectoryW
;
req
->
lpszDirectory
=
heap_strdupW
(
lpszDirectory
);
r
=
INTERNET_AsyncCall
(
&
workRequest
);
r
=
res_to_le
(
INTERNET_AsyncCall
(
&
workRequest
)
);
}
else
{
...
...
@@ -2143,7 +2150,7 @@ BOOL WINAPI FtpRenameFileW(HINTERNET hFtpSession, LPCWSTR lpszSrc, LPCWSTR lpszD
req
->
lpszSrcFile
=
heap_strdupW
(
lpszSrc
);
req
->
lpszDestFile
=
heap_strdupW
(
lpszDest
);
r
=
INTERNET_AsyncCall
(
&
workRequest
);
r
=
res_to_le
(
INTERNET_AsyncCall
(
&
workRequest
)
);
}
else
{
...
...
dlls/wininet/internet.c
View file @
88ac3a38
...
...
@@ -3141,7 +3141,7 @@ static DWORD CALLBACK INTERNET_WorkerThreadFunc(LPVOID lpvParam)
* RETURNS
*
*/
BOOL
INTERNET_AsyncCall
(
LPWORKREQUEST
lpWorkRequest
)
DWORD
INTERNET_AsyncCall
(
LPWORKREQUEST
lpWorkRequest
)
{
BOOL
bSuccess
;
LPWORKREQUEST
lpNewRequest
;
...
...
@@ -3150,7 +3150,7 @@ BOOL INTERNET_AsyncCall(LPWORKREQUEST lpWorkRequest)
lpNewRequest
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WORKREQUEST
));
if
(
!
lpNewRequest
)
return
FALSE
;
return
ERROR_OUTOFMEMORY
;
*
lpNewRequest
=
*
lpWorkRequest
;
...
...
@@ -3158,10 +3158,10 @@ BOOL INTERNET_AsyncCall(LPWORKREQUEST lpWorkRequest)
if
(
!
bSuccess
)
{
HeapFree
(
GetProcessHeap
(),
0
,
lpNewRequest
);
INTERNET_SetLastError
(
ERROR_INTERNET_ASYNC_THREAD_FAILED
)
;
return
ERROR_INTERNET_ASYNC_THREAD_FAILED
;
}
return
bSuccess
;
return
ERROR_SUCCESS
;
}
...
...
dlls/wininet/internet.h
View file @
88ac3a38
...
...
@@ -407,7 +407,7 @@ BOOL GetAddress(LPCWSTR lpszServerName, INTERNET_PORT nServerPort,
void
INTERNET_SetLastError
(
DWORD
dwError
);
DWORD
INTERNET_GetLastError
(
void
);
BOOL
INTERNET_AsyncCall
(
LPWORKREQUEST
lpWorkRequest
);
DWORD
INTERNET_AsyncCall
(
LPWORKREQUEST
lpWorkRequest
);
LPSTR
INTERNET_GetResponseBuffer
(
void
);
LPSTR
INTERNET_GetNextLine
(
INT
nSocket
,
LPDWORD
dwLen
);
...
...
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