Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
77371cc7
Commit
77371cc7
authored
9 years ago
by
Jan Tattermusch
Browse files
Options
Downloads
Plain Diff
Merge pull request #5920 from yang-g/ipv6
Fix failure handling code
parents
cf826653
b7921c7b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/core/iomgr/tcp_server_posix.c
+12
-11
12 additions, 11 deletions
src/core/iomgr/tcp_server_posix.c
with
12 additions
and
11 deletions
src/core/iomgr/tcp_server_posix.c
+
12
−
11
View file @
77371cc7
...
...
@@ -486,7 +486,6 @@ int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr,
/* If we didn't get a dualstack socket, also listen on 0.0.0.0. */
if
(
port
==
0
&&
sp
!=
NULL
)
{
grpc_sockaddr_set_port
((
struct
sockaddr
*
)
&
wild4
,
sp
->
port
);
sp2
=
sp
;
}
addr
=
(
struct
sockaddr
*
)
&
wild4
;
addr_len
=
sizeof
(
wild4
);
...
...
@@ -495,16 +494,18 @@ int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr,
fd
=
grpc_create_dualstack_socket
(
addr
,
SOCK_STREAM
,
0
,
&
dsmode
);
if
(
fd
<
0
)
{
gpr_log
(
GPR_ERROR
,
"Unable to create socket: %s"
,
strerror
(
errno
));
}
if
(
dsmode
==
GRPC_DSMODE_IPV4
&&
grpc_sockaddr_is_v4mapped
(
addr
,
&
addr4_copy
))
{
addr
=
(
struct
sockaddr
*
)
&
addr4_copy
;
addr_len
=
sizeof
(
addr4_copy
);
}
sp
=
add_socket_to_server
(
s
,
fd
,
addr
,
addr_len
,
port_index
,
fd_index
);
if
(
sp2
!=
NULL
&&
sp
!=
NULL
)
{
sp2
->
sibling
=
sp
;
sp
->
is_sibling
=
1
;
}
else
{
if
(
dsmode
==
GRPC_DSMODE_IPV4
&&
grpc_sockaddr_is_v4mapped
(
addr
,
&
addr4_copy
))
{
addr
=
(
struct
sockaddr
*
)
&
addr4_copy
;
addr_len
=
sizeof
(
addr4_copy
);
}
sp2
=
sp
;
sp
=
add_socket_to_server
(
s
,
fd
,
addr
,
addr_len
,
port_index
,
fd_index
);
if
(
sp2
!=
NULL
&&
sp
!=
NULL
)
{
sp2
->
sibling
=
sp
;
sp
->
is_sibling
=
1
;
}
}
done:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment