[OpenSIPS-Devel] [OpenSIPS/opensips] ed7a33: aaa_diameter: Avoid all pthread_cond race conditions

Liviu Chircu noreply at github.com
Mon Apr 18 14:34:47 UTC 2022


  Branch: refs/heads/3.2
  Home:   https://github.com/OpenSIPS/opensips
  Commit: ed7a33a28ff52103e35d33a32e081c1d92c2a893
      https://github.com/OpenSIPS/opensips/commit/ed7a33a28ff52103e35d33a32e081c1d92c2a893
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2022-04-18 (Mon, 18 Apr 2022)

  Changed paths:
    M modules/aaa_diameter/aaa_impl.c
    M modules/aaa_diameter/aaa_impl.h

  Log Message:
  -----------
  aaa_diameter: Avoid all pthread_cond race conditions

The recommended usage of the wait/signal pthread_cond_t functions
includes using a "counter" variable in order to keep track of any
"signal" events happening before the actual "wait".

Many thanks to Ryan Caicse (@ryancaicse) for reporting this bug and the
excellent fix suggestion!

Fixes #2789

(cherry picked from commit 5422799e77662db58d23cbd38bc92875091f177a)





More information about the Devel mailing list