Handles deadlines for flow user scripts

This commit is contained in:
Simone Mainardi 2020-02-19 10:46:44 +01:00
parent 1d0de452f0
commit 5b70db90ad
4 changed files with 17 additions and 20 deletions

View file

@ -12640,9 +12640,6 @@ void LuaEngine::setDeadline(lua_State* from) {
if(from
&& (cur_ctx = getLuaVMContext(cur_state))
&& (from_ctx = getLuaVMContext(from))) {
lua_pushinteger(cur_state, from_ctx->deadline);
lua_setglobal(cur_state, "deadline");
cur_ctx->deadline = from_ctx->deadline;
cur_ctx->threaded_activity = from_ctx->threaded_activity;
}
@ -12655,9 +12652,6 @@ void LuaEngine::setDeadline(const ThreadedActivity *ta, time_t deadline) {
lua_State *cur_state = getState();
if((cur_ctx = getLuaVMContext(cur_state))) {
lua_pushinteger(cur_state, deadline);
lua_setglobal(cur_state, "deadline");
cur_ctx->deadline = deadline;
cur_ctx->threaded_activity = ta;
}