From 650547652574ef5afb45c6f464ce72e113ab4a08 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Wed, 9 Jul 2008 18:02:26 +0200 Subject: [PATCH] Fix compiler warnings and potential crash --- src/main/listen.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main/listen.c b/src/main/listen.c index f01fb61..edba062 100644 --- a/src/main/listen.c +++ b/src/main/listen.c @@ -647,18 +647,6 @@ static int stats_socket_recv(rad_listen_t *listener, return 0; } - /* - * We only understand Status-Server on this socket. - */ - if (code != PW_STATUS_SERVER) { - DEBUG("Ignoring packet code %d sent to Status-Server port", - code); - rad_recv_discard(listener->fd); - RAD_STATS_TYPE_INC(listener, total_unknown_types); - RAD_STATS_CLIENT_INC(listener, client, total_unknown_types); - return 0; - } - if ((client = client_listener_find(listener, &src_ipaddr)) == NULL) { rad_recv_discard(listener->fd); @@ -683,6 +671,18 @@ static int stats_socket_recv(rad_listen_t *listener, } /* + * We only understand Status-Server on this socket. + */ + if (code != PW_STATUS_SERVER) { + DEBUG("Ignoring packet code %d sent to Status-Server port", + code); + rad_recv_discard(listener->fd); + RAD_STATS_TYPE_INC(listener, total_unknown_types); + RAD_STATS_CLIENT_INC(listener, client, total_unknown_types); + return 0; + } + + /* * Now that we've sanity checked everything, receive the * packet. */ @@ -1473,7 +1473,7 @@ int listen_init(CONF_SECTION *config, rad_listen_t **head) { int override = FALSE; int rcode; - CONF_SECTION *cs; + CONF_SECTION *cs = NULL; rad_listen_t **last; rad_listen_t *this; fr_ipaddr_t server_ipaddr; -- 2.1.4