[polypaudio-commits] r756 - /trunk/src/modules/module-protocol-stub.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Wed Apr 19 00:31:12 PDT 2006


Author: ossman
Date: Wed Apr 19 09:31:11 2006
New Revision: 756

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=756&root=polypaudio&view=rev
Log:
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.

Modified:
    trunk/src/modules/module-protocol-stub.c

Modified: trunk/src/modules/module-protocol-stub.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-protocol-stub.c?rev=756&root=polypaudio&r1=755&r2=756&view=diff
==============================================================================
--- trunk/src/modules/module-protocol-stub.c (original)
+++ trunk/src/modules/module-protocol-stub.c Wed Apr 19 09:31:11 2006
@@ -211,14 +211,14 @@
     listen_on = pa_modargs_get_value(ma, "listen", NULL);
 
     if (listen_on) {
+        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);
-        s_ipv6 = pa_socket_server_new_ipv6_string(c->mainloop, listen_on, port, TCPWRAP_SERVICE);
     } else if (loopback) {
+        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);
-        s_ipv6 = pa_socket_server_new_ipv6_loopback(c->mainloop, port, TCPWRAP_SERVICE);
     } else {
+        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);
-        s_ipv6 = pa_socket_server_new_ipv6_any(c->mainloop, port, TCPWRAP_SERVICE);
     }
 
     if (!s_ipv4 && !s_ipv6)




More information about the pulseaudio-commits mailing list