diff --git a/src/include/signal.h b/src/include/signal.h index 6dc6e9e195d4..1931a825aef3 100644 --- a/src/include/signal.h +++ b/src/include/signal.h @@ -37,9 +37,9 @@ extern "C" { typedef enum fr_state_signal_t { /* server action */ FR_SIGNAL_INVALID = 0, FR_SIGNAL_RUN, - FR_SIGNAL_DONE, //!< Request is completed. If a module is signalled + FR_SIGNAL_CANCEL, //!< Request has been cancelled. If a module is signalled ///< with this, the module should stop processing - ///< the request and cleanup. + ///< the request and cleanup anything it's done. FR_SIGNAL_DUP, //!< A duplicate request was received. } fr_state_signal_t; diff --git a/src/main/unlang_op.c b/src/main/unlang_op.c index 93f018e15477..31e44af41fdd 100644 --- a/src/main/unlang_op.c +++ b/src/main/unlang_op.c @@ -1047,7 +1047,7 @@ static rlm_rcode_t unlang_parallel_run(REQUEST *request, unlang_parallel_t *stat * stopped. This tells any child modules * to clean up timers, etc. */ - unlang_signal(state->children[i].child, FR_SIGNAL_DONE); + unlang_signal(state->children[i].child, FR_SIGNAL_CANCEL); TALLOC_FREE(state->children[i].child); /* FALL-THROUGH */ diff --git a/src/modules/proto_ldap_sync/proto_ldap_sync.c b/src/modules/proto_ldap_sync/proto_ldap_sync.c index 3cec5aaa36d3..f87cbd60b270 100644 --- a/src/modules/proto_ldap_sync/proto_ldap_sync.c +++ b/src/modules/proto_ldap_sync/proto_ldap_sync.c @@ -312,7 +312,7 @@ static void request_running(REQUEST *request, fr_state_signal_t action) /* * Async (in the same thread, tho) signal to be done. */ - if (action == FR_SIGNAL_DONE) goto done; + if (action == FR_SIGNAL_CANCEL) goto done; /* * We ignore all other actions. @@ -428,7 +428,7 @@ static void request_queued(REQUEST *request, fr_state_signal_t action) request->process(request, action); break; - case FR_SIGNAL_DONE: + case FR_SIGNAL_CANCEL: (void) fr_heap_extract(request->backlog, request); request_delete(request); break; diff --git a/src/modules/proto_tacacs/proto_tacacs.c b/src/modules/proto_tacacs/proto_tacacs.c index 4f42958f12f3..4988c94efbab 100644 --- a/src/modules/proto_tacacs/proto_tacacs.c +++ b/src/modules/proto_tacacs/proto_tacacs.c @@ -159,7 +159,7 @@ static void tacacs_running(REQUEST *request, fr_state_signal_t action) REQUEST_VERIFY(request); switch (action) { - case FR_SIGNAL_DONE: + case FR_SIGNAL_CANCEL: goto done; default: @@ -427,7 +427,7 @@ static void tacacs_queued(REQUEST *request, fr_state_signal_t action) request->process(request, action); break; - case FR_SIGNAL_DONE: + case FR_SIGNAL_CANCEL: (void) fr_heap_extract(request->backlog, request); request_delete(request); break; diff --git a/src/modules/rlm_delay/rlm_delay.c b/src/modules/rlm_delay/rlm_delay.c index f2a3b05f3f88..b516eed3dc10 100644 --- a/src/modules/rlm_delay/rlm_delay.c +++ b/src/modules/rlm_delay/rlm_delay.c @@ -137,7 +137,7 @@ static rlm_rcode_t mod_delay_return(UNUSED REQUEST *request, static void mod_delay_cancel(REQUEST *request, UNUSED void *instance, UNUSED void *thread, void *ctx, fr_state_signal_t action) { - if (action != FR_SIGNAL_DONE) return; + if (action != FR_SIGNAL_CANCEL) return; RDEBUG2("Cancelling delay"); @@ -207,7 +207,7 @@ static xlat_action_t xlat_delay_resume(TALLOC_CTX *ctx, fr_cursor_t *out, static void xlat_delay_cancel(REQUEST *request, UNUSED void *instance, UNUSED void *thread, void *rctx, fr_state_signal_t action) { - if (action != FR_SIGNAL_DONE) return; + if (action != FR_SIGNAL_CANCEL) return; RDEBUG2("Cancelling delay"); diff --git a/src/modules/rlm_radius/rlm_radius.c b/src/modules/rlm_radius/rlm_radius.c index 44a30d90c183..51775b2b6f0c 100644 --- a/src/modules/rlm_radius/rlm_radius.c +++ b/src/modules/rlm_radius/rlm_radius.c @@ -392,7 +392,7 @@ static void mod_radius_signal(REQUEST *request, void *instance, void *thread, vo * the IO modules to do additional debugging if * necessary. */ - if (action == FR_SIGNAL_DONE) { + if (action == FR_SIGNAL_CANCEL) { talloc_free(link); return; } diff --git a/src/modules/rlm_rest/io.c b/src/modules/rlm_rest/io.c index 8f850fe122dd..e2d1c0742883 100644 --- a/src/modules/rlm_rest/io.c +++ b/src/modules/rlm_rest/io.c @@ -324,7 +324,7 @@ static int _rest_io_event_modify(UNUSED CURL *easy, curl_socket_t fd, int what, /** Handle asynchronous cancellation of a request * - * If we're signalled that the request has been cancelled (FR_SIGNAL_DONE). + * If we're signalled that the request has been cancelled (FR_SIGNAL_CANCEL). * Cleanup any pending state and release the connection handle back into the pool. * * @param[in] request being cancelled. @@ -339,7 +339,7 @@ void rest_io_module_action(REQUEST *request, void *instance, void *thread, void rlm_rest_thread_t *t = thread; CURLMcode ret; - if (action != FR_SIGNAL_DONE) return; + if (action != FR_SIGNAL_CANCEL) return; RDEBUG("Forcefully cancelling pending REST request"); @@ -356,7 +356,7 @@ void rest_io_module_action(REQUEST *request, void *instance, void *thread, void /** Handle asynchronous cancellation of a request * - * If we're signalled that the request has been cancelled (FR_SIGNAL_DONE). + * If we're signalled that the request has been cancelled (FR_SIGNAL_CANCEL). * Cleanup any pending state and release the connection handle back into the pool. * * @param[in] request being cancelled.