From: Arran Cudbard-Bell Date: Mon, 5 Apr 2021 16:05:07 +0000 (+0100) Subject: Nothing uses request_state anymore X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c9963caad069534927991d3947c770592fa431e;p=thirdparty%2Ffreeradius-server.git Nothing uses request_state anymore --- diff --git a/src/lib/server/request.c b/src/lib/server/request.c index f9dda0f908..08111dd189 100644 --- a/src/lib/server/request.c +++ b/src/lib/server/request.c @@ -195,7 +195,6 @@ static inline CC_HINT(always_inline) int request_init(char const *file, int line #ifndef NDEBUG .magic = REQUEST_MAGIC, #endif - .request_state = REQUEST_INIT, .master_state = REQUEST_ACTIVE, .dict = args->namespace, .component = "", diff --git a/src/lib/server/request.h b/src/lib/server/request.h index bb1520d7f8..16c0154fd6 100644 --- a/src/lib/server/request.h +++ b/src/lib/server/request.h @@ -191,7 +191,6 @@ struct request_s { fr_radius_packet_t *reply; //!< Outgoing response. fr_event_list_t *el; //!< thread-specific event list. - request_state_t request_state; //!< state for the various protocol handlers. RADCLIENT *client; //!< The client that originally sent us the request. diff --git a/src/modules/rlm_stats/rlm_stats.c b/src/modules/rlm_stats/rlm_stats.c index ef3e29ee2f..b3674430b6 100644 --- a/src/modules/rlm_stats/rlm_stats.c +++ b/src/modules/rlm_stats/rlm_stats.c @@ -161,7 +161,7 @@ static unlang_action_t CC_HINT(nonnull) mod_stats(rlm_rcode_t *p_result, module_ fr_pair_t *vp; - rlm_stats_data_t mydata, *stats; + rlm_stats_data_t mydata; char buffer[64]; uint64_t local_stats[NUM_ELEMENTS(inst->stats)]; @@ -169,9 +169,13 @@ static unlang_action_t CC_HINT(nonnull) mod_stats(rlm_rcode_t *p_result, module_ * Increment counters only in "send foo" sections. * * i.e. only when we have a reply to send. + * + * FIXME - Nothing sets request_state anymore */ +#if 0 if (request->request_state == REQUEST_SEND) { int src_code, dst_code; + rlm_stats_data_t *stats; src_code = request->packet->code; if (src_code >= FR_RADIUS_CODE_MAX) src_code = 0; @@ -237,12 +241,12 @@ static unlang_action_t CC_HINT(nonnull) mod_stats(rlm_rcode_t *p_result, module_ RETURN_MODULE_UPDATED; } +#endif /* * Ignore "authenticate" and anything other than Status-Server */ - if ((request->request_state != REQUEST_RECV) || - (request->packet->code != FR_RADIUS_CODE_STATUS_SERVER)) { + if ((request->packet->code != FR_RADIUS_CODE_STATUS_SERVER)) { RETURN_MODULE_NOOP; }