summaryrefslogtreecommitdiff
path: root/res/res_pjsip_dtmf_info.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2015-05-20 15:19:27 -0500
committerMark Michelson <mmichelson@digium.com>2015-05-22 09:46:58 -0500
commit071b3d43cbc2fbcf06491a5c03cfd1f983871bce (patch)
tree81409c2b1c2a1f8e478695bee9432e1b9534cbb2 /res/res_pjsip_dtmf_info.c
parentf2cc766d817191c79b97668a67a203fe7cf1c588 (diff)
res_sorcery_memory_cache: Add support for maximum_objects.
This makes the "maximum_objects" option operational. A heap has been added alongside the hash table in the cache. When objects are added to the cache, they are also added to the heap. Similarly, when objects are removed from the cache, they are removed from the heap. The heap's use comes into play when an item is to be added to a "full" cache. When the cache is full, the oldest item is removed from the cache, using the heap to determine the oldest item. A unit test has been added that verifies that the maximum_objects option works as expected and that the oldest object is removed from the cache when an object beyond the maximum is added. ASTERISK-25067 #close Reported by Matt Jordan Change-Id: I490658830e9c4cbf0b3051e4cdc4913cf9f1b73a
Diffstat (limited to 'res/res_pjsip_dtmf_info.c')
0 files changed, 0 insertions, 0 deletions