From a50005713e52383bb1ae9bcf508010bed6bbe84d Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Thu, 9 Sep 2010 11:14:45 +0200 Subject: [PATCH] Print error message if we're not configured to listen on any ports --- src/main/listen.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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; /* -- 2.1.4