Module: kamailio
Branch: master
Commit: 829a8a6e82c8c3e2dfc678b82aa1b488ba371aed
URL:
https://github.com/kamailio/kamailio/commit/829a8a6e82c8c3e2dfc678b82aa1b48…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-04-24T09:32:27+02:00
app_lua: exported special kemi function to execute module function
- KSR.x.modf(fname, params...)
---
Modified: modules/app_lua/app_lua_sr.c
---
Diff:
https://github.com/kamailio/kamailio/commit/829a8a6e82c8c3e2dfc678b82aa1b48…
Patch:
https://github.com/kamailio/kamailio/commit/829a8a6e82c8c3e2dfc678b82aa1b48…
---
diff --git a/modules/app_lua/app_lua_sr.c b/modules/app_lua/app_lua_sr.c
index a869c52..0530fde 100644
--- a/modules/app_lua/app_lua_sr.c
+++ b/modules/app_lua/app_lua_sr.c
@@ -1687,6 +1687,14 @@ int sr_kemi_exec_func(lua_State* L, str *mname, int midx, str
*fname)
/**
*
*/
+static const luaL_Reg _sr_kemi_x_Map [] = {
+ {"modf", lua_sr_modf},
+ {NULL, NULL}
+};
+
+/**
+ *
+ */
int sr_kemi_KSR_C(lua_State* L)
{
str mname = str_init("");
@@ -1747,6 +1755,7 @@ void lua_sr_kemi_register_core(lua_State *L)
/* special modules - pv.get(...) can return int or str */
luaL_openlib(L, "KSR.pv", _sr_pv_Map, 0);
+ luaL_openlib(L, "KSR.x", _sr_kemi_x_Map, 0);
LM_DBG("pushing lua KSR table definition returned %d\n", ret);
}