diff options
Diffstat (limited to 'l_log.c')
-rw-r--r-- | l_log.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -1,14 +1,14 @@ /* * anylike * - * anylike is an IKEv2 Implementation written in Lua and C. It's main - * design goal is to provide anytun and uanytun or any other SATP - * implementation with a key exchange mechanism but it should also be - * possible to use anylike as key exchange daemon for IPSec security - * associations. The use of Lua guarantees that anylike is easily - * portable to many platforms including very small ones like wireless + * anylike is an IKEv2 Implementation written in Lua and C. It's main + * design goal is to provide anytun and uanytun or any other SATP + * implementation with a key exchange mechanism but it should also be + * possible to use anylike as key exchange daemon for IPSec security + * associations. The use of Lua guarantees that anylike is easily + * portable to many platforms including very small ones like wireless * routers. - * + * * * Copyright (C) 2009-2010 Markus Grueneis <gimpf@anylike.org> * Christian Pointner <equinox@anylike.org> @@ -63,7 +63,7 @@ static int l_log_add_target(lua_State *L) default: lua_pushstring(L, "syntax error"); break; } return 2; - } + } lua_pushboolean(L, 1); return 1; @@ -83,22 +83,22 @@ static int l_log_printf(lua_State *L) lua_remove(L, -1); lua_call(L, numargs - 1, 1); } - + log_prio_t prio = luaL_checkint(L,1); log_printf(prio, "%s", luaL_checkstring(L, 2)); return 0; } static const struct luaL_reg log_funcs [] = { - { "init", l_log_init }, - { "close", l_log_close }, + { "init", l_log_init }, + { "close", l_log_close }, { "add_target", l_log_add_target }, { "printf", l_log_printf }, { NULL, NULL } }; -LUALIB_API int luaopen_log(lua_State *L) +LUALIB_API int luaopen_log(lua_State *L) { luaL_register(L, LUA_LOGLIBNAME, log_funcs); lua_pushliteral(L, "ERROR"); |