Skip to content

Commit 9af2e34

Browse files
committed
fix(chisel): make sievt available
Signed-off-by: Roberto Scolaro <[email protected]>
1 parent acbcf59 commit 9af2e34

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

userspace/chisel/chisel.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,6 +1647,12 @@ void sinsp_chisel::do_timeout(sinsp_evt* evt)
16471647
}
16481648
}
16491649

1650+
//
1651+
// Make the event available to the API
1652+
//
1653+
lua_pushlightuserdata(m_ls, evt);
1654+
lua_setglobal(m_ls, "sievt");
1655+
16501656
lua_getglobal(m_ls, "on_interval");
16511657

16521658
lua_pushnumber(m_ls, (double)(ts / 1000000000));
@@ -1679,6 +1685,12 @@ void sinsp_chisel::do_timeout(sinsp_evt* evt)
16791685
{
16801686
uint64_t t;
16811687

1688+
//
1689+
// Make the event available to the API
1690+
//
1691+
lua_pushlightuserdata(m_ls, evt);
1692+
lua_setglobal(m_ls, "sievt");
1693+
16821694
for(t = m_lua_last_interval_sample_time; t <= ts - interval; t += interval)
16831695
{
16841696
lua_getglobal(m_ls, "on_interval");

0 commit comments

Comments
 (0)