Module: kamailio
Branch: master
Commit: 4ca055ab34e4dfcf244491257906563b571fb748
URL:
https://github.com/kamailio/kamailio/commit/4ca055ab34e4dfcf244491257906563…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-11-20T17:21:50+01:00
app_python: aliased load to script_name parameter
- load is used to specify what scripts needs to be loaded among the
modules implementing kemi
---
Modified: src/modules/app_python/app_python_mod.c
Modified: src/modules/app_python/doc/app_python_admin.xml
---
Diff:
https://github.com/kamailio/kamailio/commit/4ca055ab34e4dfcf244491257906563…
Patch:
https://github.com/kamailio/kamailio/commit/4ca055ab34e4dfcf244491257906563…
---
diff --git a/src/modules/app_python/app_python_mod.c
b/src/modules/app_python/app_python_mod.c
index 64f59fcc07..64ca55ff40 100644
--- a/src/modules/app_python/app_python_mod.c
+++ b/src/modules/app_python/app_python_mod.c
@@ -60,6 +60,7 @@ PyThreadState *myThreadState;
/** module parameters */
static param_export_t params[]={
{"script_name", PARAM_STR, &script_name },
+ {"load", PARAM_STR, &script_name },
{"mod_init_function", PARAM_STR, &mod_init_fname },
{"child_init_method", PARAM_STR, &child_init_mname },
{0,0,0}
diff --git a/src/modules/app_python/doc/app_python_admin.xml
b/src/modules/app_python/doc/app_python_admin.xml
index 9eab795662..8a2fba4fb3 100644
--- a/src/modules/app_python/doc/app_python_admin.xml
+++ b/src/modules/app_python/doc/app_python_admin.xml
@@ -58,10 +58,10 @@
</section>
<section>
<title>Parameters</title>
- <section id="app_python.p.script_name">
- <title><varname>script_name</varname> (string)</title>
+ <section id="app_python.p.load">
+ <title><varname>load</varname> (string)</title>
<para>
- The path to the fiel with Python code to be executed
+ The path to the file with Python code to be executed
from configuration file.
</para>
<para>
@@ -70,15 +70,23 @@
</emphasis>
</para>
<example>
- <title>Set <varname>script_name</varname> parameter</title>
+ <title>Set <varname>load</varname> parameter</title>
<programlisting format="linespecific">
...
-modparam("app_python", "script_name",
"/usr/local/etc/kamailio/myscript.py")
+modparam("app_python", "load",
"/usr/local/etc/kamailio/myscript.py")
...
</programlisting>
</example>
</section>
+ <section id="app_python.p.script_name">
+ <title><varname>script_name</varname> (string)</title>
+ <para>
+ This is same as "load" parameter, kept for backward compatibility
+ with the older versions of the module.
+ </para>
+ </section>
+
<section id="app_python.p.mod_init_function">
<title><varname>mod_init_function</varname>
(string)</title>
<para>