]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
the delay module can have xlat OR module timeouts
authorAlan T. DeKok <aland@freeradius.org>
Thu, 26 Sep 2019 21:45:14 +0000 (17:45 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 26 Sep 2019 21:45:14 +0000 (17:45 -0400)
src/modules/rlm_delay/rlm_delay.c

index 7ef54d62f340cbfb9e9ada0106882b6eaa2d89bf..e6086dde690f1cbe284a8fb94961d27b04276c86 100644 (file)
@@ -143,7 +143,13 @@ static void mod_delay_cancel(UNUSED void *instance, UNUSED void *thread, REQUEST
 
        RDEBUG2("Cancelling delay");
 
-       if (!fr_cond_assert(unlang_xlat_event_timeout_delete(request, rctx) == 0)) return;
+       /*
+        *      One or the other, or both will be set.  But we don't
+        *      know which ones.  So just delete both of them.
+        */
+       (void) unlang_module_timeout_delete(request, rctx);
+
+       (void) unlang_xlat_event_timeout_delete(request, rctx);
 }
 
 static rlm_rcode_t CC_HINT(nonnull) mod_delay(void *instance, UNUSED void *thread, REQUEST *request)