update(userspace/engine): resolve token

Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
This commit is contained in:
Leonardo Di Donato 2019-09-17 21:49:12 +00:00 committed by Leo Di Donato
parent 836094b28e
commit d35971e1bc
2 changed files with 3 additions and 2 deletions

View File

@ -269,8 +269,8 @@ int falco_formats::format_event (lua_State *ls)
int falco_formats::resolve_tokens(lua_State *ls)
{
if (!lua_isstring(ls, -1) ||
!lua_isstring(ls, -2)) {
if (!lua_isuserdata(ls, 1) ||
!lua_isstring(ls, 2)) {
lua_pushstring(ls, "Invalid arguments passed to resolve_tokens()");
lua_error(ls);
}

View File

@ -53,6 +53,7 @@ class falco_formats
// formatted_string = falco.format_event(evt, formatter)
static int format_event(lua_State *ls);
// resolve_tokens = falco.resolve_tokens(evt, formatter)
static int resolve_tokens(lua_State *ls);
static sinsp* s_inspector;