net.box: allow calling stored Lua and C module functions with self.call
The fix is simple: look up the function in `box.func` by name and, if found, execute its `call` method. The only tricky part is to avoid the lookup before `box.cfg` is called because `box.func` is unavailable at the time. We achieve that by checking `box.ctl.is_recovery_finished`. Closes #9131 NO_DOC=bug fix (cherry picked from commit e92a8e7b)
Showing
- changelogs/unreleased/gh-9131-net-box-self-call-stored-func.md 4 additions, 0 deletions...elogs/unreleased/gh-9131-net-box-self-call-stored-func.md
- src/box/lua/net_box.lua 6 additions, 0 deletionssrc/box/lua/net_box.lua
- test/box-luatest/CMakeLists.txt 2 additions, 0 deletionstest/box-luatest/CMakeLists.txt
- test/box-luatest/gh_9131_net_box_self_call_stored_func.c 25 additions, 0 deletionstest/box-luatest/gh_9131_net_box_self_call_stored_func.c
- test/box-luatest/gh_9131_net_box_self_call_stored_func_test.lua 125 additions, 0 deletions...ox-luatest/gh_9131_net_box_self_call_stored_func_test.lua
Loading
Please register or sign in to comment