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
a1e4bcda
Commit
a1e4bcda
authored
Mar 06, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Mar 06, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Use closesocket to close sockets and define it to close on Unix…
rpcrt4: Use closesocket to close sockets and define it to close on Unix platforms to make the code more portable.
parent
0aedac34
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
rpc_transport.c
dlls/rpcrt4/rpc_transport.c
+5
-4
No files found.
dlls/rpcrt4/rpc_transport.c
View file @
a1e4bcda
...
@@ -64,6 +64,7 @@
...
@@ -64,6 +64,7 @@
# ifdef HAVE_SYS_POLL_H
# ifdef HAVE_SYS_POLL_H
# include <sys/poll.h>
# include <sys/poll.h>
# endif
# endif
# define closesocket close
#endif
/* defined(__MINGW32__) || defined (_MSC_VER) */
#endif
/* defined(__MINGW32__) || defined (_MSC_VER) */
#include "windef.h"
#include "windef.h"
...
@@ -801,7 +802,7 @@ static RPC_STATUS rpcrt4_ncacn_ip_tcp_open(RpcConnection* Connection)
...
@@ -801,7 +802,7 @@ static RPC_STATUS rpcrt4_ncacn_ip_tcp_open(RpcConnection* Connection)
if
(
0
>
connect
(
sock
,
ai_cur
->
ai_addr
,
ai_cur
->
ai_addrlen
))
if
(
0
>
connect
(
sock
,
ai_cur
->
ai_addr
,
ai_cur
->
ai_addrlen
))
{
{
WARN
(
"connect() failed: %s
\n
"
,
strerror
(
errno
));
WARN
(
"connect() failed: %s
\n
"
,
strerror
(
errno
));
close
(
sock
);
close
socket
(
sock
);
continue
;
continue
;
}
}
...
@@ -880,7 +881,7 @@ static RPC_STATUS rpcrt4_protseq_ncacn_ip_tcp_open_endpoint(RpcServerProtseq *pr
...
@@ -880,7 +881,7 @@ static RPC_STATUS rpcrt4_protseq_ncacn_ip_tcp_open_endpoint(RpcServerProtseq *pr
if
(
ret
<
0
)
if
(
ret
<
0
)
{
{
WARN
(
"bind failed: %s
\n
"
,
strerror
(
errno
));
WARN
(
"bind failed: %s
\n
"
,
strerror
(
errno
));
close
(
sock
);
close
socket
(
sock
);
if
(
errno
==
EADDRINUSE
)
if
(
errno
==
EADDRINUSE
)
status
=
RPC_S_DUPLICATE_ENDPOINT
;
status
=
RPC_S_DUPLICATE_ENDPOINT
;
else
else
...
@@ -892,7 +893,7 @@ static RPC_STATUS rpcrt4_protseq_ncacn_ip_tcp_open_endpoint(RpcServerProtseq *pr
...
@@ -892,7 +893,7 @@ static RPC_STATUS rpcrt4_protseq_ncacn_ip_tcp_open_endpoint(RpcServerProtseq *pr
endpoint
,
NULL
,
NULL
,
NULL
);
endpoint
,
NULL
,
NULL
,
NULL
);
if
(
create_status
!=
RPC_S_OK
)
if
(
create_status
!=
RPC_S_OK
)
{
{
close
(
sock
);
close
socket
(
sock
);
status
=
create_status
;
status
=
create_status
;
continue
;
continue
;
}
}
...
@@ -1046,7 +1047,7 @@ static int rpcrt4_conn_tcp_close(RpcConnection *Connection)
...
@@ -1046,7 +1047,7 @@ static int rpcrt4_conn_tcp_close(RpcConnection *Connection)
TRACE
(
"%d
\n
"
,
tcpc
->
sock
);
TRACE
(
"%d
\n
"
,
tcpc
->
sock
);
if
(
tcpc
->
sock
!=
-
1
)
if
(
tcpc
->
sock
!=
-
1
)
close
(
tcpc
->
sock
);
close
socket
(
tcpc
->
sock
);
tcpc
->
sock
=
-
1
;
tcpc
->
sock
=
-
1
;
close
(
tcpc
->
cancel_fds
[
0
]);
close
(
tcpc
->
cancel_fds
[
0
]);
close
(
tcpc
->
cancel_fds
[
1
]);
close
(
tcpc
->
cancel_fds
[
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