Skip to content

Commit

Permalink
lua: don't register functions under a name
Browse files Browse the repository at this point in the history
This fixes issues with running the "opensips" table functions on Lua
library version 5.1.

This essentially reverts commit ab964d9.

(cherry picked from commit 5e4d10c)
  • Loading branch information
rvlad-patrascu committed Jun 22, 2023
1 parent 3cd6344 commit 7c84bfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/lua/sipstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ static const struct luaL_Reg siplua_state_mylib [] =
static void siplua_register_state_cclosures(lua_State *L)
{
lua_pushglobaltable(L);
luaL_openlib(L, "opensips", siplua_state_mylib, 0);
luaL_openlib(L, NULL, siplua_state_mylib, 0);
lua_remove(L, -1);
}

Expand Down

0 comments on commit 7c84bfc

Please sign in to comment.