From 0cb62fdabf627d9978ed335a58736322fb3762cc Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Wed, 8 Sep 2010 19:47:28 +0200 Subject: [PATCH] Bind IPv4 server first, to avoid v4compat --- src/httpd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/httpd.c b/src/httpd.c index ac31f2f8..13014416 100644 --- a/src/httpd.c +++ b/src/httpd.c @@ -1280,10 +1280,6 @@ httpd_init(void) * as IPv6 might not be supported on the system. * We still warn about the failure, in case there's another issue. */ - ret = evhttp_bind_socket(evhttpd, "::", port); - if (ret < 0) - DPRINTF(E_WARN, L_HTTPD, "Could not bind IN6ADDR_ANY:%d (that's OK)\n", port); - ret = evhttp_bind_socket(evhttpd, "0.0.0.0", port); if (ret < 0) { @@ -1292,6 +1288,10 @@ httpd_init(void) goto bind_fail; } + ret = evhttp_bind_socket(evhttpd, "::", port); + if (ret < 0) + DPRINTF(E_WARN, L_HTTPD, "Could not bind IN6ADDR_ANY:%d (that's OK)\n", port); + evhttp_set_gencb(evhttpd, httpd_gen_cb, NULL); ret = pthread_create(&tid_httpd, NULL, httpd, NULL);