2
0
Эх сурвалжийг харах

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

Henning Westerholt 14 жил өмнө
parent
commit
44ffefe75f

+ 9 - 9
modules_k/presence/README

@@ -44,7 +44,7 @@ Juha Heinanen
               3.9. max_expires (int)
               3.9. max_expires (int)
               3.10. server_address (str)
               3.10. server_address (str)
               3.11. fallback2db (int)
               3.11. fallback2db (int)
-              3.12. dbmode (int)
+              3.12. db_mode (int)
               3.13. subs_htable_size (int)
               3.13. subs_htable_size (int)
               3.14. pres_htable_size (int)
               3.14. pres_htable_size (int)
               3.15. enable_sphere_check (int)
               3.15. enable_sphere_check (int)
@@ -96,7 +96,7 @@ Juha Heinanen
    1.9. Set max_expires parameter
    1.9. Set max_expires parameter
    1.10. Set server_address parameter
    1.10. Set server_address parameter
    1.11. Set fallback2db 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.13. Set subs_htable_size parameter
    1.14. Set pres_htable_size parameter
    1.14. Set pres_htable_size parameter
    1.15. Set enable_sphere_check parameter
    1.15. Set enable_sphere_check parameter
@@ -131,7 +131,7 @@ Chapter 1. Admin Guide
         3.9. max_expires (int)
         3.9. max_expires (int)
         3.10. server_address (str)
         3.10. server_address (str)
         3.11. fallback2db (int)
         3.11. fallback2db (int)
-        3.12. dbmode (int)
+        3.12. db_mode (int)
         3.13. subs_htable_size (int)
         3.13. subs_htable_size (int)
         3.14. pres_htable_size (int)
         3.14. pres_htable_size (int)
         3.15. enable_sphere_check (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
    instances, maybe on different servers using the same database. This
    parameter remains only for legacy purposes. As a new feature for the
    parameter remains only for legacy purposes. As a new feature for the
    presence engine, it is possible to have three database modes, which one
    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,
    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
    from memory and to fallback to database mode in case a record is not
    found in memory, and from database only.
    found in memory, and from database only.
@@ -217,7 +217,7 @@ Chapter 1. Admin Guide
    3.9. max_expires (int)
    3.9. max_expires (int)
    3.10. server_address (str)
    3.10. server_address (str)
    3.11. fallback2db (int)
    3.11. fallback2db (int)
-   3.12. dbmode (int)
+   3.12. db_mode (int)
    3.13. subs_htable_size (int)
    3.13. subs_htable_size (int)
    3.14. pres_htable_size (int)
    3.14. pres_htable_size (int)
    3.15. enable_sphere_check (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)
 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 sets the mode in which records are retrieved. Setting
    this parameter to 0 or 1 is equivalent to setting fallback2db to 0 or
    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
    which records are retrieved from database only. So, the three database
    modes in which the presence engine can operate are: memory only,
    modes in which the presence engine can operate are: memory only,
    fallback to database, and database 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)
 3.13. subs_htable_size (int)

+ 6 - 6
modules_k/presence/doc/presence_admin.xml

@@ -33,8 +33,8 @@
 	an architecture in which processing and memory load might be divided on 
 	an architecture in which processing and memory load might be divided on 
 	several &kamailio; instances, maybe on different servers using the same database.
 	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
         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.
         from memory and to fallback to database mode in case a record is not found in memory, and from database only.
 	</para>
 	</para>
 	<para>The module implements several API functions, that can be used by other
 	<para>The module implements several API functions, that can be used by other
@@ -299,18 +299,18 @@ modparam("presence", "fallback2db", 1)
 		</example>
 		</example>
 	</section>
 	</section>
 <section>
 <section>
-		<title><varname>dbmode</varname> (int)</title>
+		<title><varname>db_mode</varname> (int)</title>
 		<para>
 		<para>
 		This parameter sets the mode in which records are retrieved.
 		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.
                 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.
                 So, the three database modes in which the presence engine can operate are: memory only, fallback to database, and database only.
 		</para>
 		</para>
 		<example>
 		<example>
-		<title>Set <varname>dbmode</varname> parameter</title>
+		<title>Set <varname>db_mode</varname> parameter</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
 ...
 ...
-modparam("presence", "dbmode", 2)
+modparam("presence", "db_mode", 2)
 ...
 ...
 </programlisting>
 </programlisting>
 		</example>
 		</example>

+ 1 - 1
modules_k/presence/presence.c

@@ -177,7 +177,7 @@ static param_export_t params[]={
 	{ "server_address",         STR_PARAM, &server_address.s},
 	{ "server_address",         STR_PARAM, &server_address.s},
 	{ "subs_htable_size",       INT_PARAM, &shtable_size},
 	{ "subs_htable_size",       INT_PARAM, &shtable_size},
 	{ "pres_htable_size",       INT_PARAM, &phtable_size},
 	{ "pres_htable_size",       INT_PARAM, &phtable_size},
-	{ "dbmode",                 INT_PARAM, &dbmode},
+	{ "db_mode",                INT_PARAM, &dbmode},
 	{ "fallback2db",            INT_PARAM, &fallback2db},
 	{ "fallback2db",            INT_PARAM, &fallback2db},
 	{ "enable_sphere_check",    INT_PARAM, &sphere_enable},
 	{ "enable_sphere_check",    INT_PARAM, &sphere_enable},
 	{ "timeout_rm_subs",        INT_PARAM, &timeout_rm_subs},
 	{ "timeout_rm_subs",        INT_PARAM, &timeout_rm_subs},