[sr-dev] git:master: presence: rename recently added parameter to the 'standard' db_mode that others uses

Henning Westerholt henning.westerholt at 1und1.de
Fri Jul 1 17:16:38 CEST 2011


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

Author: Henning Westerholt <henning.westerholt at 1und1.de>
Committer: Henning Westerholt <henning.westerholt at 1und1.de>
Date:   Fri Jul  1 17:12:35 2011 +0200

presence: rename recently added parameter to the 'standard' db_mode that others uses

---

 modules_k/presence/README                 |   18 +++++++++---------
 modules_k/presence/doc/presence_admin.xml |   12 ++++++------
 modules_k/presence/presence.c             |    2 +-
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/modules_k/presence/README b/modules_k/presence/README
index d5e4458..060eef3 100644
--- a/modules_k/presence/README
+++ b/modules_k/presence/README
@@ -44,7 +44,7 @@ Juha Heinanen
               3.9. max_expires (int)
               3.10. server_address (str)
               3.11. fallback2db (int)
-              3.12. dbmode (int)
+              3.12. db_mode (int)
               3.13. subs_htable_size (int)
               3.14. pres_htable_size (int)
               3.15. enable_sphere_check (int)
@@ -96,7 +96,7 @@ Juha Heinanen
    1.9. Set max_expires parameter
    1.10. Set server_address parameter
    1.11. Set fallback2db parameter
-   1.12. Set dbmode parameter
+   1.12. Set db_mode parameter
    1.13. Set subs_htable_size parameter
    1.14. Set pres_htable_size parameter
    1.15. Set enable_sphere_check parameter
@@ -131,7 +131,7 @@ Chapter 1. Admin Guide
         3.9. max_expires (int)
         3.10. server_address (str)
         3.11. fallback2db (int)
-        3.12. dbmode (int)
+        3.12. db_mode (int)
         3.13. subs_htable_size (int)
         3.14. pres_htable_size (int)
         3.15. enable_sphere_check (int)
@@ -175,7 +175,7 @@ Chapter 1. Admin Guide
    instances, maybe on different servers using the same database. This
    parameter remains only for legacy purposes. As a new feature for the
    presence engine, it is possible to have three database modes, which one
-   can configure through the dbmode parameter. Setting dbmode to 0, 1, 2
+   can configure through the db_mode parameter. Setting db_mode to 0, 1, 2
    respective will cause the subscribers to be retrieved from memory only,
    from memory and to fallback to database mode in case a record is not
    found in memory, and from database only.
@@ -217,7 +217,7 @@ Chapter 1. Admin Guide
    3.9. max_expires (int)
    3.10. server_address (str)
    3.11. fallback2db (int)
-   3.12. dbmode (int)
+   3.12. db_mode (int)
    3.13. subs_htable_size (int)
    3.14. pres_htable_size (int)
    3.15. enable_sphere_check (int)
@@ -359,18 +359,18 @@ modparam("presence", "server_address", "sip:10.10.10.10:5060")
 modparam("presence", "fallback2db", 1)
 ...
 
-3.12. dbmode (int)
+3.12. db_mode (int)
 
    This parameter sets the mode in which records are retrieved. Setting
    this parameter to 0 or 1 is equivalent to setting fallback2db to 0 or
-   1, respectiv. The dbmode parameter can also take a third value, 2, in
+   1, respectiv. The db_mode parameter can also take a third value, 2, in
    which records are retrieved from database only. So, the three database
    modes in which the presence engine can operate are: memory only,
    fallback to database, and database only.
 
-   Example 1.12. Set dbmode parameter
+   Example 1.12. Set db_mode parameter
 ...
-modparam("presence", "dbmode", 2)
+modparam("presence", "db_mode", 2)
 ...
 
 3.13. subs_htable_size (int)
diff --git a/modules_k/presence/doc/presence_admin.xml b/modules_k/presence/doc/presence_admin.xml
index d13d913..854224f 100644
--- a/modules_k/presence/doc/presence_admin.xml
+++ b/modules_k/presence/doc/presence_admin.xml
@@ -33,8 +33,8 @@
 	an architecture in which processing and memory load might be divided on 
 	several &kamailio; instances, maybe on different servers using the same database.
         This parameter remains only for legacy purposes. As a new feature for the presence engine, it is possible
-        to have three database modes, which one can configure through the dbmode parameter.
-        Setting dbmode to 0, 1, 2 respective will cause the subscribers to be retrieved from memory only,
+        to have three database modes, which one can configure through the db_mode parameter.
+        Setting db_mode to 0, 1, 2 respective will cause the subscribers to be retrieved from memory only,
         from memory and to fallback to database mode in case a record is not found in memory, and from database only.
 	</para>
 	<para>The module implements several API functions, that can be used by other
@@ -299,18 +299,18 @@ modparam("presence", "fallback2db", 1)
 		</example>
 	</section>
 <section>
-		<title><varname>dbmode</varname> (int)</title>
+		<title><varname>db_mode</varname> (int)</title>
 		<para>
 		This parameter sets the mode in which records are retrieved.
                 Setting this parameter to 0 or 1 is equivalent to setting fallback2db to 0 or 1, respectiv.
-                The dbmode parameter can also take a third value, 2, in which records are retrieved from database only.
+                The db_mode parameter can also take a third value, 2, in which records are retrieved from database only.
                 So, the three database modes in which the presence engine can operate are: memory only, fallback to database, and database only.
 		</para>
 		<example>
-		<title>Set <varname>dbmode</varname> parameter</title>
+		<title>Set <varname>db_mode</varname> parameter</title>
 		<programlisting format="linespecific">
 ...
-modparam("presence", "dbmode", 2)
+modparam("presence", "db_mode", 2)
 ...
 </programlisting>
 		</example>
diff --git a/modules_k/presence/presence.c b/modules_k/presence/presence.c
index a1cb13f..df1a4ac 100644
--- a/modules_k/presence/presence.c
+++ b/modules_k/presence/presence.c
@@ -177,7 +177,7 @@ static param_export_t params[]={
 	{ "server_address",         STR_PARAM, &server_address.s},
 	{ "subs_htable_size",       INT_PARAM, &shtable_size},
 	{ "pres_htable_size",       INT_PARAM, &phtable_size},
-	{ "dbmode",                 INT_PARAM, &dbmode},
+	{ "db_mode",                INT_PARAM, &dbmode},
 	{ "fallback2db",            INT_PARAM, &fallback2db},
 	{ "enable_sphere_check",    INT_PARAM, &sphere_enable},
 	{ "timeout_rm_subs",        INT_PARAM, &timeout_rm_subs},




More information about the sr-dev mailing list