From: Alan T. DeKok Date: Tue, 13 Dec 2022 14:13:29 +0000 (-0500) Subject: typo and clean up "stop" handling. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=018a97562e208a9246c9234af165abcb4d755780;p=thirdparty%2Ffreeradius-server.git typo and clean up "stop" handling. The main unlang_interpret_stop() should take care of interpreter issues, so the worker "stop" callbac shouldn't do that. --- diff --git a/src/lib/io/worker.c b/src/lib/io/worker.c index cf48a7b4017..555fe5c7f27 100644 --- a/src/lib/io/worker.c +++ b/src/lib/io/worker.c @@ -381,12 +381,6 @@ static void worker_stop_request(request_t **request_p) * the internal/external callbacs. */ unlang_interpret_signal(*request_p, FR_SIGNAL_CANCEL); - - /* - * Cancel just signals each frame. We need to tell - * everything else that this request is dead. - */ - (*request_p)->master_state == REQUEST_STOP_PROCESSING' *request_p = NULL; } @@ -1100,25 +1094,12 @@ static void _worker_request_stop(request_t *request, void *uctx) fr_time_tracking_resume(&request->async->tracking, fr_time()); } - /* - * Let everyone know the request is being - * stopped. - */ - request->master_state = REQUEST_STOP_PROCESSING; - /* * If the request is in the runnable queue * yank it back out, so it's not "runnable" * when we call request done. */ if (fr_heap_entry_inserted(request->runnable_id)) fr_heap_extract(&worker->runnable, request); - - /* - * The interpreter doesn't currently fix - * this for us, so we set the indent to 0 - * to avoid nasty asserts later. - */ - request->log.unlang_indent = 0; } /** Request is now runnable diff --git a/src/lib/unlang/interpret.c b/src/lib/unlang/interpret.c index 237cde0df6a..48de4f1c3d9 100644 --- a/src/lib/unlang/interpret.c +++ b/src/lib/unlang/interpret.c @@ -996,6 +996,7 @@ void unlang_interpret_request_stop(request_t *request) intp = stack->intp; intp->funcs.stop(request, intp->uctx); request->log.unlang_indent = 0; /* nothing unwinds the indentation stack */ + request->master_state = REQUEST_STOP_PROCESSING; } static inline CC_HINT(always_inline)