From: Alan T. DeKok Date: Thu, 9 Sep 2010 09:14:45 +0000 (+0200) Subject: Print error message if we're not configured to listen on any ports X-Git-Tag: release_2_1_10~46 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=freeradius.git;a=commitdiff_plain;h=a50005713e5238;hp=dfe54bde62b5e538c7cff27cef18fc05d5252b6f Print error message if we're not configured to listen on any ports --- diff --git a/src/main/listen.c b/src/main/listen.c index 2722d79..f812654 100644 --- a/src/main/listen.c +++ b/src/main/listen.c @@ -2130,17 +2130,20 @@ int listen_init(CONF_SECTION *config, rad_listen_t **head) * Otherwise, don't do anything. */ do_proxy: + /* + * No sockets to receive packets, this is an error. + * proxying is pointless. + */ + if (!*head) { + radlog(L_ERR, "The server is not configured to listen on any ports. Cannot start."); + return -1; + } + #ifdef WITH_PROXY if (mainconfig.proxy_requests == TRUE) { int port = -1; listen_socket_t *sock = NULL; - /* - * No sockets to receive packets, therefore - * proxying is pointless. - */ - if (!*head) return -1; - if (defined_proxy) goto check_home_servers; /*