]> Kevux Git Server - fll/commitdiff
Bugfix: Controller error printing function has wrong locking.
authorKevin Day <Kevin@kevux.org>
Mon, 8 Jul 2024 03:00:09 +0000 (22:00 -0500)
committerKevin Day <Kevin@kevux.org>
Mon, 8 Jul 2024 03:00:09 +0000 (22:00 -0500)
The locking being used in controller_rule_item_print_error() is based on the special case for when fll_error_print() is used.
The fll_error_print() is not being used so do not use the special case locking.

level_3/controller/c/rule/private-rule_print.c

index 0f6a7301956d4ca42b85f6c8fd153e4f5dd13db8..af72ae4abd3d92543cfb81a87e5e40caa6c6a025 100644 (file)
@@ -66,13 +66,10 @@ extern "C" {
     if (print.verbosity == f_console_verbosity_quiet_e) return;
     if (status == F_interrupt) return;
 
-    // fll_error_print() automatically locks, so manually handle only the mutex locking and flushing rather than calling controller_lock_print().
-    f_thread_mutex_lock(&thread->lock.print);
+    controller_lock_print(print.to, thread);
 
     controller_rule_print_error_cache(print, cache, item);
 
-    flockfile(print.to.stream);
-
     controller_unlock_print_flush(print.to, thread);
   }
 #endif // _di_controller_rule_item_print_error_