[OpenSIPS-Devel] [OpenSIPS/opensips] a37642: ratelimit: don't add json object if map is empty

Răzvan Crainea noreply at github.com
Wed Oct 9 04:57:47 EDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: a37642ab6db917c9ed8317cbccbbff1dc6433b3b
      https://github.com/OpenSIPS/opensips/commit/a37642ab6db917c9ed8317cbccbbff1dc6433b3b
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M modules/ratelimit/ratelimit_helper.c

  Log Message:
  -----------
  ratelimit: don't add json object if map is empty

An object map was added for each hash entry, even though there were no
pipes in that hash, resulting in a huge list of empty hashes [{},{} ...]
This fix does not add an object in the resulted array if the map is
empty.





More information about the Devel mailing list