From: Arran Cudbard-Bell Date: Sun, 21 Mar 2021 21:57:28 +0000 (+0000) Subject: No modules should call RETURN_MODULE_YIELD X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aedbe5bb237322e7916b71425de80d61f382b38e;p=thirdparty%2Ffreeradius-server.git No modules should call RETURN_MODULE_YIELD --- diff --git a/src/lib/server/rcode.h b/src/lib/server/rcode.h index 2b01e2c8322..f1da47d2646 100644 --- a/src/lib/server/rcode.h +++ b/src/lib/server/rcode.h @@ -62,7 +62,6 @@ typedef enum { #define RETURN_MODULE_NOTFOUND do { *p_result = RLM_MODULE_NOTFOUND; return UNLANG_ACTION_CALCULATE_RESULT; } while (0) #define RETURN_MODULE_NOOP do { *p_result = RLM_MODULE_NOOP; return UNLANG_ACTION_CALCULATE_RESULT; } while (0) #define RETURN_MODULE_UPDATED do { *p_result = RLM_MODULE_UPDATED; return UNLANG_ACTION_CALCULATE_RESULT; } while (0) -#define RETURN_MODULE_YIELD do { *p_result = RLM_MODULE_YIELD; return UNLANG_ACTION_YIELD; } while (0) #define RETURN_MODULE_RCODE(_rcode) do { *p_result = (_rcode); return UNLANG_ACTION_CALCULATE_RESULT; } while (0) extern fr_table_num_sorted_t const rcode_table[]; diff --git a/src/modules/rlm_radius/rlm_radius_udp.c b/src/modules/rlm_radius/rlm_radius_udp.c index 0a1037a8cad..fcb675ab264 100644 --- a/src/modules/rlm_radius/rlm_radius_udp.c +++ b/src/modules/rlm_radius/rlm_radius_udp.c @@ -2754,7 +2754,7 @@ static unlang_action_t mod_enqueue(rlm_rcode_t *p_result, void **rctx_out, void *rctx_out = r; - RETURN_MODULE_YIELD; + return UNLANG_ACTION_YIELD; } /** Instantiate thread data for the submodule. diff --git a/src/process/arp/base.c b/src/process/arp/base.c index c8eba335156..91f2537d983 100644 --- a/src/process/arp/base.c +++ b/src/process/arp/base.c @@ -116,7 +116,7 @@ static unlang_action_t mod_process(rlm_rcode_t *p_result, UNUSED module_ctx_t co return UNLANG_ACTION_STOP_PROCESSING; } - if (rcode == RLM_MODULE_YIELD) RETURN_MODULE_YIELD; + if (rcode == RLM_MODULE_YIELD) return UNLANG_ACTION_YIELD; /* * Allow the admin to explicitly set the reply @@ -173,7 +173,7 @@ static unlang_action_t mod_process(rlm_rcode_t *p_result, UNUSED module_ctx_t co return UNLANG_ACTION_STOP_PROCESSING; } - if (rcode == RLM_MODULE_YIELD) RETURN_MODULE_YIELD; + if (rcode == RLM_MODULE_YIELD) return UNLANG_ACTION_YIELD; switch (rcode) { case RLM_MODULE_NOOP: diff --git a/src/process/dhcpv4/base.c b/src/process/dhcpv4/base.c index de5c59ec74a..b91b666c0f4 100644 --- a/src/process/dhcpv4/base.c +++ b/src/process/dhcpv4/base.c @@ -184,7 +184,7 @@ static unlang_action_t mod_process(rlm_rcode_t *p_result, UNUSED module_ctx_t co return UNLANG_ACTION_STOP_PROCESSING; } - if (rcode == RLM_MODULE_YIELD) RETURN_MODULE_YIELD; + if (rcode == RLM_MODULE_YIELD) return UNLANG_ACTION_YIELD; /* * Allow the admin to explicitly set the reply @@ -252,7 +252,7 @@ static unlang_action_t mod_process(rlm_rcode_t *p_result, UNUSED module_ctx_t co return UNLANG_ACTION_STOP_PROCESSING; } - if (rcode == RLM_MODULE_YIELD) RETURN_MODULE_YIELD; + if (rcode == RLM_MODULE_YIELD) return UNLANG_ACTION_YIELD; switch (rcode) { case RLM_MODULE_NOOP: diff --git a/src/process/tacacs/base.c b/src/process/tacacs/base.c index fd7bda58483..c62d331c587 100644 --- a/src/process/tacacs/base.c +++ b/src/process/tacacs/base.c @@ -257,7 +257,7 @@ static unlang_action_t mod_process(rlm_rcode_t *p_result, module_ctx_t const *mc return UNLANG_ACTION_STOP_PROCESSING; } - if (rcode == RLM_MODULE_YIELD) RETURN_MODULE_YIELD; + if (rcode == RLM_MODULE_YIELD) return UNLANG_ACTION_YIELD; switch (rcode) { case RLM_MODULE_NOOP: @@ -385,7 +385,7 @@ static unlang_action_t mod_process(rlm_rcode_t *p_result, module_ctx_t const *mc return UNLANG_ACTION_STOP_PROCESSING; } - if (rcode == RLM_MODULE_YIELD) RETURN_MODULE_YIELD; + if (rcode == RLM_MODULE_YIELD) return UNLANG_ACTION_YIELD; switch (rcode) { /* @@ -429,7 +429,7 @@ static unlang_action_t mod_process(rlm_rcode_t *p_result, module_ctx_t const *mc return UNLANG_ACTION_STOP_PROCESSING; } - if (rcode == RLM_MODULE_YIELD) RETURN_MODULE_YIELD; + if (rcode == RLM_MODULE_YIELD) return UNLANG_ACTION_YIELD; switch (rcode) { case RLM_MODULE_FAIL: diff --git a/src/process/vmps/base.c b/src/process/vmps/base.c index 6ffb6b590b3..e191a5d3d9c 100644 --- a/src/process/vmps/base.c +++ b/src/process/vmps/base.c @@ -92,7 +92,7 @@ static unlang_action_t mod_process(rlm_rcode_t *p_result, UNUSED module_ctx_t co return UNLANG_ACTION_STOP_PROCESSING; } - if (rcode == RLM_MODULE_YIELD) RETURN_MODULE_YIELD; + if (rcode == RLM_MODULE_YIELD) return UNLANG_ACTION_YIELD; switch (rcode) { case RLM_MODULE_NOOP: @@ -140,7 +140,7 @@ static unlang_action_t mod_process(rlm_rcode_t *p_result, UNUSED module_ctx_t co return UNLANG_ACTION_STOP_PROCESSING; } - if (rcode == RLM_MODULE_YIELD) RETURN_MODULE_YIELD; + if (rcode == RLM_MODULE_YIELD) return UNLANG_ACTION_YIELD; switch (rcode) { case RLM_MODULE_NOOP: