瀏覽代碼

app_lua: exported special sub-module KSR.pv

- pv.get() can return int or string, not following the pattern from kemi
  generic function interface
Daniel-Constantin Mierla 9 年之前
父節點
當前提交
3fccc0aa13
共有 1 個文件被更改,包括 7 次插入2 次删除
  1. 7 2
      modules/app_lua/app_lua_sr.c

+ 7 - 2
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);
 }
 
 /**