]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
s/FR_SIGNAL_DONE/FR_SIGNAL_CANCEL/
authorAlan T. DeKok <aland@freeradius.org>
Thu, 8 Feb 2018 17:31:58 +0000 (12:31 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 8 Feb 2018 17:31:58 +0000 (12:31 -0500)
the request has been cancelled, but it might not be done.

src/include/signal.h
src/main/unlang_op.c
src/modules/proto_ldap_sync/proto_ldap_sync.c
src/modules/proto_tacacs/proto_tacacs.c
src/modules/rlm_delay/rlm_delay.c
src/modules/rlm_radius/rlm_radius.c
src/modules/rlm_rest/io.c

index 6dc6e9e195d49395ec8d1f6b389d9a864e0fb547..1931a825aef337bebffa5378507a608421df5a67 100644 (file)
@@ -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;
 
index 93f018e154770c883f309cd2e0fc3eee15fb3fa0..31e44af41fddff9e05b5b3aa7fff5c21f5f689d4 100644 (file)
@@ -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 */
 
index 3cec5aaa36d3d65503be6018447327d846957eed..f87cbd60b2704b9941e95ca14a47c8b2cce36def 100644 (file)
@@ -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;
index 4f42958f12f3e4ff1da693c491bf294b7d9cc885..4988c94efbab7db737015b5e1cfd6d961d191247 100644 (file)
@@ -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;
index f2a3b05f3f88b75f5e950fc76d61171fdc828d1a..b516eed3dc109ab36748bdc69f0f641f5a541016 100644 (file)
@@ -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");
 
index 44a30d90c183b2d5e142e635ba70f8d12aed6722..51775b2b6f0c2c0dd1efc2a0f11882e479feb462 100644 (file)
@@ -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;
        }
index 8f850fe122dd3b9aa83ac4c2c22fc8106cea37fa..e2d1c074288354cf36834ab5e87075d22e09d532 100644 (file)
@@ -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.