diff --git a/src/mod/languages/mod_lua/mod_lua.c b/src/mod/languages/mod_lua/mod_lua.c index 6cc0f29305..c8151d20c1 100644 --- a/src/mod/languages/mod_lua/mod_lua.c +++ b/src/mod/languages/mod_lua/mod_lua.c @@ -25,15 +25,14 @@ * * Anthony Minessale II * - * mod_lua.c -- Framework Demo Module + * mod_lua.c -- Lua * */ + #include #include "lua.h" #include #include -//#include -//#include "mod_lua_wrap.h" SWITCH_MODULE_LOAD_FUNCTION(mod_lua_load); SWITCH_MODULE_DEFINITION(mod_lua, mod_lua_load, NULL, NULL); @@ -42,7 +41,6 @@ static struct { switch_memory_pool_t *pool; } globals; - int luaopen_freeswitch(lua_State* L); static lua_State *lua_init(void) @@ -95,7 +93,6 @@ static int docall (lua_State *L, int narg, int clear) { return status; } - static void lua_parse_and_execute(lua_State *L, char *input_code) { int error = 0; @@ -171,8 +168,8 @@ int lua_thread(const char *text) return 0; } -SWITCH_STANDARD_APP(lua_function) { - +SWITCH_STANDARD_APP(lua_function) +{ lua_State *L = lua_init(); char code[1024] = ""; snprintf(code, sizeof(code), "~session = LUASession:new(\"%s\");", switch_core_session_get_uuid(session));