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
8ef78d06
Commit
8ef78d06
authored
Mar 11, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 12, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Get rid of no longer needed sock_get_error.
parent
f0aff23d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
18 deletions
+11
-18
ftp.c
dlls/wininet/ftp.c
+2
-2
internet.h
dlls/wininet/internet.h
+0
-1
netconnection.c
dlls/wininet/netconnection.c
+9
-15
No files found.
dlls/wininet/ftp.c
View file @
8ef78d06
...
...
@@ -1222,7 +1222,7 @@ static DWORD FTPFILE_WriteFile(object_header_t *hdr, const void *buffer, DWORD s
res
=
sock_send
(
lpwh
->
nDataSocket
,
buffer
,
size
,
0
);
*
written
=
res
>
0
?
res
:
0
;
return
res
>=
0
?
ERROR_SUCCESS
:
sock_get_e
rror
();
return
res
>=
0
?
ERROR_SUCCESS
:
WSAGetLastE
rror
();
}
static
void
FTP_ReceiveRequestData
(
ftp_file_t
*
file
,
BOOL
first_notif
)
...
...
@@ -2564,7 +2564,7 @@ HINTERNET FTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName,
if
(
connect
(
nsocket
,
(
struct
sockaddr
*
)
&
socketAddr
,
sock_namelen
)
<
0
)
{
ERR
(
"Unable to connect (%d)
\n
"
,
sock_get_e
rror
());
ERR
(
"Unable to connect (%d)
\n
"
,
WSAGetLastE
rror
());
INTERNET_SetLastError
(
ERROR_INTERNET_CANNOT_CONNECT
);
closesocket
(
nsocket
);
}
...
...
dlls/wininet/internet.h
View file @
8ef78d06
...
...
@@ -434,7 +434,6 @@ BOOL NETCON_is_alive(netconn_t*) DECLSPEC_HIDDEN;
LPCVOID
NETCON_GetCert
(
netconn_t
*
connection
)
DECLSPEC_HIDDEN
;
int
NETCON_GetCipherStrength
(
netconn_t
*
)
DECLSPEC_HIDDEN
;
DWORD
NETCON_set_timeout
(
netconn_t
*
connection
,
BOOL
send
,
DWORD
value
)
DECLSPEC_HIDDEN
;
int
sock_get_error
(
void
)
DECLSPEC_HIDDEN
;
int
sock_send
(
int
fd
,
const
void
*
msg
,
size_t
len
,
int
flags
)
DECLSPEC_HIDDEN
;
int
sock_recv
(
int
fd
,
void
*
msg
,
size_t
len
,
int
flags
)
DECLSPEC_HIDDEN
;
...
...
dlls/wininet/netconnection.c
View file @
8ef78d06
...
...
@@ -301,7 +301,7 @@ static DWORD create_netconn_socket(server_t *server, netconn_t *netconn, DWORD t
result
=
connect
(
netconn
->
socket
,
(
struct
sockaddr
*
)
&
server
->
addr
,
server
->
addr_len
);
if
(
result
==
-
1
)
{
res
=
sock_get_e
rror
();
res
=
WSAGetLastE
rror
();
if
(
res
==
WSAEINPROGRESS
||
res
==
WSAEWOULDBLOCK
)
{
FD_SET
set
;
int
res
;
...
...
@@ -410,12 +410,6 @@ void NETCON_unload(void)
WSACleanup
();
}
/* translate a unix error code into a winsock one */
int
sock_get_error
(
void
)
{
return
WSAGetLastError
();
}
int
sock_send
(
int
fd
,
const
void
*
msg
,
size_t
len
,
int
flags
)
{
int
ret
;
...
...
@@ -423,7 +417,7 @@ int sock_send(int fd, const void *msg, size_t len, int flags)
{
ret
=
send
(
fd
,
msg
,
len
,
flags
);
}
while
(
ret
==
-
1
&&
sock_get_e
rror
()
==
WSAEINTR
);
while
(
ret
==
-
1
&&
WSAGetLastE
rror
()
==
WSAEINTR
);
return
ret
;
}
...
...
@@ -434,7 +428,7 @@ int sock_recv(int fd, void *msg, size_t len, int flags)
{
ret
=
recv
(
fd
,
msg
,
len
,
flags
);
}
while
(
ret
==
-
1
&&
sock_get_e
rror
()
==
WSAEINTR
);
while
(
ret
==
-
1
&&
WSAGetLastE
rror
()
==
WSAEINTR
);
return
ret
;
}
...
...
@@ -671,7 +665,7 @@ DWORD NETCON_send(netconn_t *connection, const void *msg, size_t len, int flags,
if
(
!
connection
->
secure
)
{
*
sent
=
sock_send
(
connection
->
socket
,
msg
,
len
,
flags
);
return
*
sent
==
-
1
?
sock_get_e
rror
()
:
ERROR_SUCCESS
;
return
*
sent
==
-
1
?
WSAGetLastE
rror
()
:
ERROR_SUCCESS
;
}
else
{
...
...
@@ -723,7 +717,7 @@ static BOOL read_ssl_chunk(netconn_t *conn, void *buf, SIZE_T buf_size, blocking
size
=
sock_recv
(
conn
->
socket
,
conn
->
ssl_buf
+
buf_len
,
ssl_buf_size
-
buf_len
,
0
);
if
(
size
<
0
)
{
if
(
!
buf_len
)
{
if
(
sock_get_e
rror
()
==
WSAEWOULDBLOCK
)
{
if
(
WSAGetLastE
rror
()
==
WSAEWOULDBLOCK
)
{
TRACE
(
"would block
\n
"
);
return
WSAEWOULDBLOCK
;
}
...
...
@@ -763,7 +757,7 @@ static BOOL read_ssl_chunk(netconn_t *conn, void *buf, SIZE_T buf_size, blocking
set_socket_blocking
(
conn
->
socket
,
mode
);
size
=
sock_recv
(
conn
->
socket
,
conn
->
ssl_buf
+
buf_len
,
ssl_buf_size
-
buf_len
,
0
);
if
(
size
<
1
)
{
if
(
size
<
0
&&
sock_get_e
rror
()
==
WSAEWOULDBLOCK
)
{
if
(
size
<
0
&&
WSAGetLastE
rror
()
==
WSAEWOULDBLOCK
)
{
TRACE
(
"would block
\n
"
);
/* FIXME: Optimize extra_buf usage. */
...
...
@@ -838,7 +832,7 @@ DWORD NETCON_recv(netconn_t *connection, void *buf, size_t len, blocking_mode_t
set_socket_blocking
(
connection
->
socket
,
mode
);
*
recvd
=
sock_recv
(
connection
->
socket
,
buf
,
len
,
flags
);
return
*
recvd
==
-
1
?
sock_get_e
rror
()
:
ERROR_SUCCESS
;
return
*
recvd
==
-
1
?
WSAGetLastE
rror
()
:
ERROR_SUCCESS
;
}
else
{
...
...
@@ -926,7 +920,7 @@ BOOL NETCON_is_alive(netconn_t *netconn)
len
=
sock_recv
(
netconn
->
socket
,
&
b
,
1
,
MSG_PEEK
);
set_socket_blocking
(
netconn
->
socket
,
BLOCKING_ALLOW
);
return
len
==
1
||
(
len
==
-
1
&&
sock_get_e
rror
()
==
WSAEWOULDBLOCK
);
return
len
==
1
||
(
len
==
-
1
&&
WSAGetLastE
rror
()
==
WSAEWOULDBLOCK
);
}
LPCVOID
NETCON_GetCert
(
netconn_t
*
connection
)
...
...
@@ -974,7 +968,7 @@ DWORD NETCON_set_timeout(netconn_t *connection, BOOL send, DWORD value)
if
(
result
==
-
1
)
{
WARN
(
"setsockopt failed
\n
"
);
return
sock_get_e
rror
();
return
WSAGetLastE
rror
();
}
return
ERROR_SUCCESS
;
}
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