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
481cec40
Commit
481cec40
authored
Apr 21, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Apr 21, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Invalid sockets should have a value of -1.
parent
36fb66dc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
rpc_transport.c
dlls/rpcrt4/rpc_transport.c
+7
-4
No files found.
dlls/rpcrt4/rpc_transport.c
View file @
481cec40
...
...
@@ -254,7 +254,10 @@ typedef struct _RpcConnection_tcp
static
RpcConnection
*
rpcrt4_conn_tcp_alloc
(
void
)
{
return
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
RpcConnection_tcp
));
RpcConnection_tcp
*
tcpc
;
tcpc
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
RpcConnection_tcp
));
tcpc
->
sock
=
-
1
;
return
&
tcpc
->
common
;
}
static
RPC_STATUS
rpcrt4_ncacn_ip_tcp_open
(
RpcConnection
*
Connection
)
...
...
@@ -271,7 +274,7 @@ static RPC_STATUS rpcrt4_ncacn_ip_tcp_open(RpcConnection* Connection)
return
RPC_S_SERVER_UNAVAILABLE
;
}
if
(
tcpc
->
sock
)
if
(
tcpc
->
sock
!=
-
1
)
return
RPC_S_OK
;
sa
.
sin_family
=
AF_INET
;
...
...
@@ -335,9 +338,9 @@ static int rpcrt4_conn_tcp_close(RpcConnection *Connection)
RpcConnection_tcp
*
tcpc
=
(
RpcConnection_tcp
*
)
Connection
;
TRACE
(
"%d
\n
"
,
tcpc
->
sock
);
if
(
tcpc
->
sock
)
if
(
tcpc
->
sock
!=
-
1
)
close
(
tcpc
->
sock
);
tcpc
->
sock
=
0
;
tcpc
->
sock
=
-
1
;
return
0
;
}
...
...
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