Module: kamailio
Branch: master
Commit: 3fccc0aa1364c92a9f23fd488580eb92da012834
URL:
https://github.com/kamailio/kamailio/commit/3fccc0aa1364c92a9f23fd488580eb9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-04-19T19:41:29+02:00
app_lua: exported special sub-module KSR.pv
- pv.get() can return int or string, not following the pattern from kemi
generic function interface
---
Modified: modules/app_lua/app_lua_sr.c
---
Diff:
https://github.com/kamailio/kamailio/commit/3fccc0aa1364c92a9f23fd488580eb9…
Patch:
https://github.com/kamailio/kamailio/commit/3fccc0aa1364c92a9f23fd488580eb9…
---
diff --git a/modules/app_lua/app_lua_sr.c b/modules/app_lua/app_lua_sr.c
index 036642d..fd9acce 100644
--- a/modules/app_lua/app_lua_sr.c
+++ b/modules/app_lua/app_lua_sr.c
@@ -1737,7 +1737,11 @@ void lua_sr_kemi_register_core(lua_State *L)
"end\n"
"setmetatable(KSR, KSR)\n"
);
- LM_DBG("pushin lua KSR table definition returned %d\n", ret);
+
+ /* special modules - pv.get(...) can return int or str */
+ luaL_openlib(L, "KSR.pv", _sr_pv_Map, 0);
+
+ LM_DBG("pushing lua KSR table definition returned %d\n", ret);
}
/**
@@ -1766,7 +1770,8 @@ void lua_sr_kemi_register_module(lua_State *L, str *mname, int
midx)
);
ret = luaL_dostring(L, sbuf);
- LM_DBG("pushin lua KSR table definition returned %d\n", ret);
+ LM_DBG("pushing lua KSR.%.*s table definition returned %d\n",
+ mname->len, mname->s, ret);
}
/**