[sr-dev] git:master: htable: Update documentation on mod-init

Olle E. Johansson oej at edvina.net
Fri Nov 30 09:32:50 CET 2012


Module: sip-router
Branch: master
Commit: 3376e3b8c54a7c9bc13f87368baeaaa145a9ced5
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3376e3b8c54a7c9bc13f87368baeaaa145a9ced5

Author: Olle E. Johansson <oej at edvina.net>
Committer: Olle E. Johansson <oej at edvina.net>
Date:   Fri Nov 30 09:31:47 2012 +0100

htable: Update documentation on mod-init

Based on Daniel's answer in sr-dev on a question about lua. The Lua environment
is initialized in child processes, so it's not reachable in mod-init.

---

 modules_k/htable/README               |   22 ++++++++++++----------
 modules_k/htable/doc/htable_admin.xml |    5 +++--
 2 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/modules_k/htable/README b/modules_k/htable/README
index a4e9155..ae0f786 100644
--- a/modules_k/htable/README
+++ b/modules_k/htable/README
@@ -309,7 +309,7 @@ modparam("htable", "htable", "c=>size=4;autoexpire=7200;initval=1;")
 
    Example 1.4. Set db_url parameter
 ...
-modparam("htable", "db_url", "mysql://openser:openserrw@localhost/openser")
+modparam("htable", "db_url", "mysql://kamailio:kamailiorw@localhost/kamailio")
 ...
 
 3.3. key_name_column (str)
@@ -431,7 +431,7 @@ modparam("htable", "db_expires", 1)
    4.2. sht_rm_name_re(htable=>regexp)
    4.3. sht_rm_value_re(htable=>regexp)
 
-4.1. sht_print()
+4.1.  sht_print()
 
    Dump content of hash table to L_ERR log level. Intended for debug
    purposes.
@@ -444,7 +444,7 @@ modparam("htable", "db_expires", 1)
 sht_print();
 ...
 
-4.2. sht_rm_name_re(htable=>regexp)
+4.2.  sht_rm_name_re(htable=>regexp)
 
    Delete all entries in the htable that match the name against regular
    expression.
@@ -457,7 +457,7 @@ sht_print();
 sht_rm_name_re("ha=>.*");
 ...
 
-4.3. sht_rm_value_re(htable=>regexp)
+4.3.  sht_rm_value_re(htable=>regexp)
 
    Delete all entries in the htable that match the value against regular
    expression.
@@ -488,7 +488,7 @@ sht_rm_value_re("ha=>.*");
    6.2. sht_dump
    6.3. sht_delete
 
-6.1. sht_reload
+6.1.  sht_reload
 
    Reload a hash table from database.
 
@@ -501,7 +501,7 @@ sht_rm_value_re("ha=>.*");
                 _hash_table_name_
                 _empty_line_
 
-6.2. sht_dump
+6.2.  sht_dump
 
    Dump content of a hash table via MI.
 
@@ -514,7 +514,7 @@ sht_rm_value_re("ha=>.*");
                 _hash_table_name_
                 _empty_line_
 
-6.3. sht_delete
+6.3.  sht_delete
 
    Delete a key from a hash table via MI.
 
@@ -537,11 +537,13 @@ sht_rm_value_re("ha=>.*");
 
    7.1. htable:mod-init
 
-7.1. htable:mod-init
+7.1.  htable:mod-init
 
    When defined, the module calls event_route[htable:mod-init] after all
-   modules have been initialised. A typical use case is to initialise
-   items in hash tables. The event route is executed only once.
+   modules have been initialized. A typical use case is to initialise
+   items in hash tables. The event route is executed only once, after core
+   and module initialization, but before Kamailio forks any child
+   processes.
 ...
 event_route[htable:mod-init] {
     $sht(a=>x) = 1;
diff --git a/modules_k/htable/doc/htable_admin.xml b/modules_k/htable/doc/htable_admin.xml
index 32f51ce..b9e95ea 100644
--- a/modules_k/htable/doc/htable_admin.xml
+++ b/modules_k/htable/doc/htable_admin.xml
@@ -683,9 +683,10 @@ sht_rm_value_re("ha=>.*");
 		</title>
 		<para>
 			When defined, the module calls event_route[htable:mod-init] after
-			all modules have been initialised. A typical use case is to
+			all modules have been initialized. A typical use case is to
 			initialise items in hash tables. The event route is executed only
-			once.
+			once, after core and module initialization, but before &kamailio; forks any
+			child processes.
 		</para>
         <programlisting  format="linespecific">
 ...			




More information about the sr-dev mailing list