mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-31 22:25:33 -04:00
Reverse order of IPv6/IPv4 binding to handle systems without IPV6_V6ONLY.
System that always do IPV6_V6ONLY will now still bind to both sockets, just in another order. System that never do IPV6_V6ONLY will now fail to bind IPv4 instead of IPv6. But since they force IPv6 sockets to accept IPv4 connections, everything is peachy anyway. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@756 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
494f602074
commit
4bb5822618
1 changed files with 3 additions and 3 deletions
|
|
@ -211,14 +211,14 @@ int pa__init(pa_core *c, pa_module*m) {
|
|||
listen_on = pa_modargs_get_value(ma, "listen", NULL);
|
||||
|
||||
if (listen_on) {
|
||||
s_ipv4 = pa_socket_server_new_ipv4_string(c->mainloop, listen_on, port, TCPWRAP_SERVICE);
|
||||
s_ipv6 = pa_socket_server_new_ipv6_string(c->mainloop, listen_on, port, TCPWRAP_SERVICE);
|
||||
s_ipv4 = pa_socket_server_new_ipv4_string(c->mainloop, listen_on, port, TCPWRAP_SERVICE);
|
||||
} else if (loopback) {
|
||||
s_ipv4 = pa_socket_server_new_ipv4_loopback(c->mainloop, port, TCPWRAP_SERVICE);
|
||||
s_ipv6 = pa_socket_server_new_ipv6_loopback(c->mainloop, port, TCPWRAP_SERVICE);
|
||||
s_ipv4 = pa_socket_server_new_ipv4_loopback(c->mainloop, port, TCPWRAP_SERVICE);
|
||||
} else {
|
||||
s_ipv4 = pa_socket_server_new_ipv4_any(c->mainloop, port, TCPWRAP_SERVICE);
|
||||
s_ipv6 = pa_socket_server_new_ipv6_any(c->mainloop, port, TCPWRAP_SERVICE);
|
||||
s_ipv4 = pa_socket_server_new_ipv4_any(c->mainloop, port, TCPWRAP_SERVICE);
|
||||
}
|
||||
|
||||
if (!s_ipv4 && !s_ipv6)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue