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
febbb855
Commit
febbb855
authored
Mar 01, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 01, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Renamed socketFD to socket.
parent
c6ee6d6c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
22 deletions
+22
-22
internet.h
dlls/wininet/internet.h
+1
-1
netconnection.c
dlls/wininet/netconnection.c
+21
-21
No files found.
dlls/wininet/internet.h
View file @
febbb855
...
...
@@ -89,8 +89,8 @@ BOOL collect_connections(collect_type_t) DECLSPEC_HIDDEN;
/* used for netconnection.c stuff */
typedef
struct
{
int
socket
;
BOOL
secure
;
int
socketFD
;
void
*
ssl_s
;
server_t
*
server
;
DWORD
security_flags
;
...
...
dlls/wininet/netconnection.c
View file @
febbb855
...
...
@@ -610,39 +610,39 @@ static DWORD create_netconn_socket(server_t *server, netconn_t *netconn, DWORD t
int
result
,
flag
;
assert
(
server
->
addr_len
);
result
=
netconn
->
socket
FD
=
socket
(
server
->
addr
.
ss_family
,
SOCK_STREAM
,
0
);
result
=
netconn
->
socket
=
socket
(
server
->
addr
.
ss_family
,
SOCK_STREAM
,
0
);
if
(
result
!=
-
1
)
{
flag
=
1
;
ioctlsocket
(
netconn
->
socket
FD
,
FIONBIO
,
&
flag
);
result
=
connect
(
netconn
->
socket
FD
,
(
struct
sockaddr
*
)
&
server
->
addr
,
server
->
addr_len
);
ioctlsocket
(
netconn
->
socket
,
FIONBIO
,
&
flag
);
result
=
connect
(
netconn
->
socket
,
(
struct
sockaddr
*
)
&
server
->
addr
,
server
->
addr_len
);
if
(
result
==
-
1
)
{
if
(
sock_get_error
(
errno
)
==
WSAEINPROGRESS
)
{
struct
pollfd
pfd
;
int
res
;
pfd
.
fd
=
netconn
->
socket
FD
;
pfd
.
fd
=
netconn
->
socket
;
pfd
.
events
=
POLLOUT
;
res
=
poll
(
&
pfd
,
1
,
timeout
);
if
(
!
res
)
{
closesocket
(
netconn
->
socket
FD
);
closesocket
(
netconn
->
socket
);
return
ERROR_INTERNET_CANNOT_CONNECT
;
}
else
if
(
res
>
0
)
{
int
err
;
socklen_t
len
=
sizeof
(
err
);
if
(
!
getsockopt
(
netconn
->
socket
FD
,
SOL_SOCKET
,
SO_ERROR
,
&
err
,
&
len
)
&&
!
err
)
if
(
!
getsockopt
(
netconn
->
socket
,
SOL_SOCKET
,
SO_ERROR
,
&
err
,
&
len
)
&&
!
err
)
result
=
0
;
}
}
}
if
(
result
==
-
1
)
closesocket
(
netconn
->
socket
FD
);
closesocket
(
netconn
->
socket
);
else
{
flag
=
0
;
ioctlsocket
(
netconn
->
socket
FD
,
FIONBIO
,
&
flag
);
ioctlsocket
(
netconn
->
socket
,
FIONBIO
,
&
flag
);
}
}
if
(
result
==
-
1
)
...
...
@@ -650,7 +650,7 @@ static DWORD create_netconn_socket(server_t *server, netconn_t *netconn, DWORD t
#ifdef TCP_NODELAY
flag
=
1
;
result
=
setsockopt
(
netconn
->
socket
FD
,
IPPROTO_TCP
,
TCP_NODELAY
,
(
void
*
)
&
flag
,
sizeof
(
flag
));
result
=
setsockopt
(
netconn
->
socket
,
IPPROTO_TCP
,
TCP_NODELAY
,
(
void
*
)
&
flag
,
sizeof
(
flag
));
if
(
result
<
0
)
WARN
(
"setsockopt(TCP_NODELAY) failed
\n
"
);
#endif
...
...
@@ -681,7 +681,7 @@ DWORD create_netconn(BOOL useSSL, server_t *server, DWORD security_flags, BOOL m
if
(
!
netconn
)
return
ERROR_OUTOFMEMORY
;
netconn
->
socket
FD
=
-
1
;
netconn
->
socket
=
-
1
;
netconn
->
security_flags
=
security_flags
|
server
->
security_flags
;
netconn
->
mask_errors
=
mask_errors
;
list_init
(
&
netconn
->
pool_entry
);
...
...
@@ -709,7 +709,7 @@ void free_netconn(netconn_t *netconn)
}
#endif
closesocket
(
netconn
->
socket
FD
);
closesocket
(
netconn
->
socket
);
heap_free
(
netconn
);
}
...
...
@@ -823,7 +823,7 @@ static DWORD netcon_secure_connect_setup(netconn_t *connection, long tls_option)
}
pSSL_set_options
(
ssl_s
,
tls_option
);
if
(
!
pSSL_set_fd
(
ssl_s
,
connection
->
socket
FD
))
if
(
!
pSSL_set_fd
(
ssl_s
,
connection
->
socket
))
{
ERR
(
"SSL_set_fd failed: %s
\n
"
,
pERR_error_string
(
pERR_get_error
(),
0
));
...
...
@@ -904,7 +904,7 @@ DWORD NETCON_secure_connect(netconn_t *connection, server_t *server)
/* fallback to connect without TLSv1.1/TLSv1.2 */
if
(
res
==
ERROR_INTERNET_SECURITY_CHANNEL_ERROR
)
{
closesocket
(
connection
->
socket
FD
);
closesocket
(
connection
->
socket
);
pSSL_CTX_set_options
(
ctx
,
SSL_OP_NO_TLSv1_1
|
SSL_OP_NO_TLSv1_2
);
res
=
create_netconn_socket
(
connection
->
server
,
connection
,
500
);
if
(
res
!=
ERROR_SUCCESS
)
...
...
@@ -928,7 +928,7 @@ DWORD NETCON_send(netconn_t *connection, const void *msg, size_t len, int flags,
{
if
(
!
connection
->
secure
)
{
*
sent
=
send
(
connection
->
socket
FD
,
msg
,
len
,
flags
);
*
sent
=
send
(
connection
->
socket
,
msg
,
len
,
flags
);
if
(
*
sent
==
-
1
)
return
sock_get_error
(
errno
);
return
ERROR_SUCCESS
;
...
...
@@ -966,7 +966,7 @@ DWORD NETCON_recv(netconn_t *connection, void *buf, size_t len, int flags, int *
if
(
!
connection
->
secure
)
{
*
recvd
=
recv
(
connection
->
socket
FD
,
buf
,
len
,
flags
);
*
recvd
=
recv
(
connection
->
socket
,
buf
,
len
,
flags
);
return
*
recvd
==
-
1
?
sock_get_error
(
errno
)
:
ERROR_SUCCESS
;
}
else
...
...
@@ -1004,7 +1004,7 @@ BOOL NETCON_query_data_available(netconn_t *connection, DWORD *available)
{
#ifdef FIONREAD
int
unread
;
int
retval
=
ioctlsocket
(
connection
->
socket
FD
,
FIONREAD
,
&
unread
);
int
retval
=
ioctlsocket
(
connection
->
socket
,
FIONREAD
,
&
unread
);
if
(
!
retval
)
{
TRACE
(
"%d bytes of queued, but unread data
\n
"
,
unread
);
...
...
@@ -1030,7 +1030,7 @@ BOOL NETCON_is_alive(netconn_t *netconn)
ssize_t
len
;
BYTE
b
;
len
=
recv
(
netconn
->
socket
FD
,
&
b
,
1
,
MSG_PEEK
|
MSG_DONTWAIT
);
len
=
recv
(
netconn
->
socket
,
&
b
,
1
,
MSG_PEEK
|
MSG_DONTWAIT
);
return
len
==
1
||
(
len
==
-
1
&&
errno
==
EWOULDBLOCK
);
#elif defined(__MINGW32__) || defined(_MSC_VER)
ULONG
mode
;
...
...
@@ -1038,13 +1038,13 @@ BOOL NETCON_is_alive(netconn_t *netconn)
char
b
;
mode
=
1
;
if
(
!
ioctlsocket
(
netconn
->
socket
FD
,
FIONBIO
,
&
mode
))
if
(
!
ioctlsocket
(
netconn
->
socket
,
FIONBIO
,
&
mode
))
return
FALSE
;
len
=
recv
(
netconn
->
socket
FD
,
&
b
,
1
,
MSG_PEEK
);
len
=
recv
(
netconn
->
socket
,
&
b
,
1
,
MSG_PEEK
);
mode
=
0
;
if
(
!
ioctlsocket
(
netconn
->
socket
FD
,
FIONBIO
,
&
mode
))
if
(
!
ioctlsocket
(
netconn
->
socket
,
FIONBIO
,
&
mode
))
return
FALSE
;
return
len
==
1
||
(
len
==
-
1
&&
errno
==
WSAEWOULDBLOCK
);
...
...
@@ -1111,7 +1111,7 @@ DWORD NETCON_set_timeout(netconn_t *connection, BOOL send, DWORD value)
tv
.
tv_sec
=
value
/
1000
;
tv
.
tv_usec
=
(
value
%
1000
)
*
1000
;
}
result
=
setsockopt
(
connection
->
socket
FD
,
SOL_SOCKET
,
result
=
setsockopt
(
connection
->
socket
,
SOL_SOCKET
,
send
?
SO_SNDTIMEO
:
SO_RCVTIMEO
,
(
void
*
)
&
tv
,
sizeof
(
tv
));
if
(
result
==
-
1
)
...
...
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