]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-5014 --resolve
authorJeff Lenk <jeff@jefflenk.com>
Fri, 11 Jan 2013 17:12:50 +0000 (11:12 -0600)
committerJeff Lenk <jeff@jefflenk.com>
Fri, 11 Jan 2013 17:12:50 +0000 (11:12 -0600)
src/mod/event_handlers/mod_event_socket/mod_event_socket.c

index f1dc5874e83e15bbb1ccae9d75c89bc197bdbdd1..28c8a995681e864400fba20b8309d2e14314e112 100644 (file)
@@ -2789,6 +2789,13 @@ SWITCH_MODULE_RUNTIME_FUNCTION(mod_event_socket_runtime)
                rv = switch_socket_opt_set(listen_list.sock, SWITCH_SO_REUSEADDR, 1);
                if (rv)
                        goto sock_fail;
+#ifdef WIN32
+               /* Enable dual-stack listening on Windows (if the listening address is IPv6), it's default on Linux */
+               if (switch_sockaddr_get_family(sa) == AF_INET6) {
+                       rv = switch_socket_opt_set(listen_list.sock, 16384, 0);
+                       if (rv) goto sock_fail;
+               }
+#endif
                rv = switch_socket_bind(listen_list.sock, sa);
                if (rv)
                        goto sock_fail;