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
0345a578
Commit
0345a578
authored
Nov 08, 2006
by
Rob Shearman
Committed by
Alexandre Julliard
Nov 09, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: For TCP endpoints, bind to all the address and ports that getaddrinfo for the machine.
parent
034eaa1c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
10 deletions
+27
-10
rpc_transport.c
dlls/rpcrt4/rpc_transport.c
+27
-10
No files found.
dlls/rpcrt4/rpc_transport.c
View file @
0345a578
...
...
@@ -736,6 +736,7 @@ static RPC_STATUS rpcrt4_protseq_ncacn_ip_tcp_open_endpoint(RpcServerProtseq *pr
struct
addrinfo
*
ai
;
struct
addrinfo
*
ai_cur
;
struct
addrinfo
hints
;
RpcConnection
*
first_connection
=
NULL
;
TRACE
(
"(%p, %s)
\n
"
,
protseq
,
endpoint
);
...
...
@@ -761,6 +762,8 @@ static RPC_STATUS rpcrt4_protseq_ncacn_ip_tcp_open_endpoint(RpcServerProtseq *pr
for
(
ai_cur
=
ai
;
ai_cur
;
ai_cur
=
ai_cur
->
ai_next
)
{
RpcConnection_tcp
*
tcpc
;
RPC_STATUS
create_status
;
if
(
TRACE_ON
(
rpc
))
{
char
host
[
256
];
...
...
@@ -790,20 +793,22 @@ static RPC_STATUS rpcrt4_protseq_ncacn_ip_tcp_open_endpoint(RpcServerProtseq *pr
status
=
RPC_S_CANT_CREATE_ENDPOINT
;
continue
;
}
status
=
RPCRT4_CreateConnection
((
RpcConnection
**
)
&
tcpc
,
TRUE
,
protseq
->
Protseq
,
NULL
,
endpoint
,
NULL
,
NULL
,
NULL
);
if
(
status
!=
RPC_S_OK
)
create_
status
=
RPCRT4_CreateConnection
((
RpcConnection
**
)
&
tcpc
,
TRUE
,
protseq
->
Protseq
,
NULL
,
endpoint
,
NULL
,
NULL
,
NULL
);
if
(
create_
status
!=
RPC_S_OK
)
{
close
(
sock
);
status
=
create_status
;
continue
;
}
tcpc
->
sock
=
sock
;
ret
=
listen
(
sock
,
protseq
->
MaxCalls
);
if
(
ret
<
0
)
{
WARN
(
"listen failed: %s
\n
"
,
strerror
(
errno
));
close
(
sock
);
RPCRT4_DestroyConnection
(
&
tcpc
->
common
);
status
=
RPC_S_OUT_OF_RESOURCES
;
continue
;
}
...
...
@@ -815,24 +820,36 @@ static RPC_STATUS rpcrt4_protseq_ncacn_ip_tcp_open_endpoint(RpcServerProtseq *pr
if
(
ret
<
0
)
{
WARN
(
"couldn't make socket non-blocking, error %d
\n
"
,
ret
);
close
(
sock
);
RPCRT4_DestroyConnection
(
&
tcpc
->
common
);
status
=
RPC_S_OUT_OF_RESOURCES
;
continue
;
}
tcpc
->
sock
=
sock
;
tcpc
->
common
.
Next
=
first_connection
;
first_connection
=
&
tcpc
->
common
;
}
freeaddrinfo
(
ai
);
/* if at least one connection was created for an endpoint then
* return success */
if
(
first_connection
)
{
RpcConnection
*
conn
;
/* find last element in list */
for
(
conn
=
first_connection
;
conn
->
Next
;
conn
=
conn
->
Next
)
;
EnterCriticalSection
(
&
protseq
->
cs
);
tcpc
->
common
.
Next
=
protseq
->
conn
;
protseq
->
conn
=
&
tcpc
->
comm
on
;
conn
->
Next
=
protseq
->
conn
;
protseq
->
conn
=
first_connecti
on
;
LeaveCriticalSection
(
&
protseq
->
cs
);
TRACE
(
"listening on %s
\n
"
,
endpoint
);
return
RPC_S_OK
;
}
freeaddrinfo
(
ai
);
ERR
(
"couldn't listen on port %s
\n
"
,
endpoint
);
return
status
;
}
...
...
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