[OpenSIPS-Devel] [OpenSIPS/opensips] 00c4cb: aaa_diameter: Fix locking issues when sending requ...

Liviu Chircu noreply at github.com
Tue Mar 19 12:25:23 UTC 2024


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 00c4cbeaf88004fd3fec663bf8f0ea47bcce16d7
      https://github.com/OpenSIPS/opensips/commit/00c4cbeaf88004fd3fec663bf8f0ea47bcce16d7
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2024-03-19 (Tue, 19 Mar 2024)

  Changed paths:
    M modules/aaa_diameter/dm_impl.c

  Log Message:
  -----------
  aaa_diameter: Fix locking issues when sending requests

- avoid READ ops on the @msg pointer, after it's queued for sending
      (subject to race condition with the Diameter Peer process, which
        can free the memory before we read it)
- lock the "reply_cond" variable *before* queueing the msg for sending
      (avoids race condition where the reply signal arrives *before*
            we even call pthread_cond_timedwait())
- rename "req" to "msg", as _dm_send_message() also originates Answers
- normalize return code 1 (req sent, ignoring reply) to 0 (success)



To unsubscribe from these emails, change your notification settings at https://github.com/OpenSIPS/opensips/settings/notifications



More information about the Devel mailing list