diff options
Diffstat (limited to 'lib/frrscript.c')
| -rw-r--r-- | lib/frrscript.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/frrscript.c b/lib/frrscript.c index b3f8a9f6f5..b385ad7eaa 100644 --- a/lib/frrscript.c +++ b/lib/frrscript.c @@ -205,12 +205,12 @@ void *frrscript_get_result(struct frrscript *fs, const char *function_name, lfs = hash_lookup(fs->lua_function_hash, &lookup); - if (lfs == NULL) { + if (lfs == NULL) return NULL; - } /* results table is idx 1 on the stack, getfield pushes our item to idx - * 2*/ + * 2 + */ lua_getfield(lfs->L, 1, name); if (lua_isnil(lfs->L, -1)) { lua_pop(lfs->L, 1); @@ -259,6 +259,7 @@ int frrscript_load(struct frrscript *fs, const char *function_name, /* Set up the Lua script */ lua_State *L = luaL_newstate(); + frrlua_export_logging(L); char script_name[MAXPATHLEN * 2]; |
