Browse Source

app_python: aliased load to script_name parameter

- load is used to specify what scripts needs to be loaded among the
modules implementing kemi
Daniel-Constantin Mierla 7 years ago
parent
commit
4ca055ab34

+ 1 - 0
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}

+ 13 - 5
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>