Uploaded image for project: 'FreeSWITCH'
  1. FreeSWITCH
  2. FS-8978

Mod_Hiredis: Limit counter value is not automatically decremented in Redis when the call is hung up

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6, 1.6.6
    • Fix Version/s: 1.6
    • Component/s: mod_hiredis
    • Labels:
      None
    • Environment:
      Debian 8
    • CPU Architecture:
      x86-64
    • Kernel:
      Linux
    • uname:
      Linux mz-debian8 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u4 (2016-02-29) x86_64 GNU/Linux
    • Userland:
      GNU/Linux
    • Distribution:
      Debian
    • Distribution Version:
      Debian 8 jessie
    • lsb_release:
      Hide
      Distributor ID: Debian
      Description: Debian GNU/Linux 8.3 (jessie)
      Release: 8.3
      Codename: jessie
      Show
      Distributor ID: Debian Description: Debian GNU/Linux 8.3 (jessie) Release: 8.3 Codename: jessie
    • Compiler:
      gcc
    • Compiler Version:
      4.9.2
    • FreeSWITCH GIT Revision:
      FreeSWITCH Version 1.7.0+git~20160323T225337Z~a42ab11022~64bit (git a42ab11 2016-03-23 22:53:37Z 64bit)
    • GIT Master Revision hash::
      4e8c224
    • Target Version:

      Description

      The limit counter value is not automatically decremented in Redis when the call is hung up. This results in it only ever counting up and the limit being eventually hit.

      Please see attached patch. The linked list is moved on too early. When limit_pvt is checked, it is NULL. This means the "decr" command is never sent to Redis.

      A temporary configuration workaround is to add an arbitrary "limit" application call before the real "limit" application call. E.g.

      <action application="limit" data="hiredis default not_the_real_limit_key 100/1"/>
      <action application="limit" data="hiredis default the_real_limit_key 100/1 limit_exceeded"/> 
      

      This results in not_the_real_limit_key being infinitely incremented and the_real_limit_key enforcing the limit correctly.

        Attachments

          Activity

            People

            • Assignee:
              quentusrex William King
              Reporter:
              phil.lavin Phil Lavin
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: