Module: sip-router Branch: master Commit: 309b25afb335444c11d6a86efc997fc4b88fdfb4 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=309b25af...
Author: Elena-Ramona Modroiu ramona@asipto.com Committer: Elena-Ramona Modroiu ramona@asipto.com Date: Mon Sep 8 18:43:35 2014 +0200
htable: documented sht_reset(...)
---
modules/htable/README | 44 +++++++++++++++++++++++----------- modules/htable/doc/htable_admin.xml | 20 ++++++++++++++++ 2 files changed, 50 insertions(+), 14 deletions(-)
diff --git a/modules/htable/README b/modules/htable/README index 31e6821..7a7c3cf 100644 --- a/modules/htable/README +++ b/modules/htable/README @@ -58,8 +58,9 @@ Ovidiu Sas 4.1. sht_print() 4.2. sht_rm_name_re(htable=>regexp) 4.3. sht_rm_value_re(htable=>regexp) - 4.4. sht_lock(htable=>key) - 4.5. sht_unlock(htable=>key) + 4.4. sht_reset(htable) + 4.5. sht_lock(htable=>key) + 4.6. sht_unlock(htable=>key)
5. Exported pseudo-variables 6. MI Commands @@ -105,8 +106,9 @@ Ovidiu Sas 1.17. sht_print usage 1.18. sht_rm_name_re usage 1.19. sht_rm_value_re usage - 1.20. sht_lock usage - 1.21. sht_unlock usage + 1.20. sht_reset usage + 1.21. sht_lock usage + 1.22. sht_unlock usage
Chapter 1. Admin Guide
@@ -140,8 +142,9 @@ Chapter 1. Admin Guide 4.1. sht_print() 4.2. sht_rm_name_re(htable=>regexp) 4.3. sht_rm_value_re(htable=>regexp) - 4.4. sht_lock(htable=>key) - 4.5. sht_unlock(htable=>key) + 4.4. sht_reset(htable) + 4.5. sht_lock(htable=>key) + 4.6. sht_unlock(htable=>key)
5. Exported pseudo-variables 6. MI Commands @@ -445,8 +448,8 @@ $ kamcmd htable.dump htable ... modparam("htable", "htable", "a=>size=4;autoexpire=7200;dbtable=htable_a;") modparam("htable", "htable", "b=>size=5;") -modparam("htable", "htable", "c=>size=4;autoexpire=7200;initval=1;dmqreplicate= -1;") +modparam("htable", "htable", "c=>size=4;autoexpire=7200;initval=1;dmqreplicate=1 +;") ...
3.2. db_url (str) @@ -600,8 +603,9 @@ modparam("htable", "enable_dmq", 1) 4.1. sht_print() 4.2. sht_rm_name_re(htable=>regexp) 4.3. sht_rm_value_re(htable=>regexp) - 4.4. sht_lock(htable=>key) - 4.5. sht_unlock(htable=>key) + 4.4. sht_reset(htable) + 4.5. sht_lock(htable=>key) + 4.6. sht_unlock(htable=>key)
4.1. sht_print()
@@ -642,24 +646,36 @@ sht_rm_name_re("ha=>.*"); sht_rm_value_re("ha=>.*"); ...
-4.4. sht_lock(htable=>key) +4.4. sht_reset(htable) + + Delete all entries in the htable. The name of the hash table can be a + dynamic string with variables. + + This function can be used from ANY_ROUTE. + + Example 1.20. sht_reset usage +... +sht_reset("ha$var(x)"); +... + +4.5. sht_lock(htable=>key)
Lock the slot in htable corespoding to the key item.
This function can be used from ANY_ROUTE.
- Example 1.20. sht_lock usage + Example 1.21. sht_lock usage ... sht_lock("ha=>test"); ...
-4.5. sht_unlock(htable=>key) +4.6. sht_unlock(htable=>key)
Unlock the slot in htable corespoding to the key item.
This function can be used from ANY_ROUTE.
- Example 1.21. sht_unlock usage + Example 1.22. sht_unlock usage ... sht_lock("ha=>test"); $sht(ha=>test) = $sht(ha=>test) + 10; diff --git a/modules/htable/doc/htable_admin.xml b/modules/htable/doc/htable_admin.xml index 4cabff9..6427a28 100644 --- a/modules/htable/doc/htable_admin.xml +++ b/modules/htable/doc/htable_admin.xml @@ -710,6 +710,26 @@ sht_rm_value_re("ha=>.*"); </programlisting> </example> </section> + <section id="htable.f.sht_reset"> + <title> + <function moreinfo="none">sht_reset(htable)</function> + </title> + <para> + Delete all entries in the htable. The name of the hash table + can be a dynamic string with variables. + </para> + <para> + This function can be used from ANY_ROUTE. + </para> + <example> + <title><function>sht_reset</function> usage</title> + <programlisting format="linespecific"> +... +sht_reset("ha$var(x)"); +... +</programlisting> + </example> + </section> <section id="htable.f.sht_lock"> <title> <function moreinfo="none">sht_lock(htable=>key)</function>