]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Nothing uses request_state anymore
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 5 Apr 2021 16:05:07 +0000 (17:05 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 5 Apr 2021 20:50:02 +0000 (21:50 +0100)
src/lib/server/request.c
src/lib/server/request.h
src/modules/rlm_stats/rlm_stats.c

index f9dda0f90877d294c812cf22ea9412c3eddd9036..08111dd18992ff322ecf8975a6cc4b520200aeab 100644 (file)
@@ -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 = "<pre-core>",
index bb1520d7f8dcc057fedd086c6ecd7fae87c690d1..16c0154fd6cffb8ca3c83996b3964f3b47310f66 100644 (file)
@@ -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.
 
index ef3e29ee2f03318b22a2579747f8f868d8f40cbc..b3674430b6f26b78b058414bf171305435b7adf6 100644 (file)
@@ -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;
        }