diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-01-25 15:26:49 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-01-25 15:26:49 +0000 |
commit | 8881a3f927d65aa49ba81486f5fb78efafb090bd (patch) | |
tree | d18b363c9fff18061e4cc7e53b5fb781ec8efa44 /src | |
parent | cce29af0f68b166d649306d8bd1261689d9a6eeb (diff) | |
download | rspamd-8881a3f927d65aa49ba81486f5fb78efafb090bd.tar.gz rspamd-8881a3f927d65aa49ba81486f5fb78efafb090bd.zip |
Fix sqlite3 API initialization
Diffstat (limited to 'src')
-rw-r--r-- | src/lua/lua_common.c | 1 | ||||
-rw-r--r-- | src/lua/lua_common.h | 1 | ||||
-rw-r--r-- | src/lua/lua_sqlite3.c | 4 |
3 files changed, 4 insertions, 2 deletions
diff --git a/src/lua/lua_common.c b/src/lua/lua_common.c index 2c4e913f6..70de192a8 100644 --- a/src/lua/lua_common.c +++ b/src/lua/lua_common.c @@ -248,6 +248,7 @@ rspamd_lua_init () luaopen_tcp (L); luaopen_html (L); luaopen_fann (L); + luaopen_sqlite3 (L); rspamd_lua_add_preload (L, "ucl", luaopen_ucl); diff --git a/src/lua/lua_common.h b/src/lua/lua_common.h index 62ac54f3d..b18b494a3 100644 --- a/src/lua/lua_common.h +++ b/src/lua/lua_common.h @@ -224,6 +224,7 @@ void luaopen_util (lua_State * L); void luaopen_tcp (lua_State * L); void luaopen_html (lua_State * L); void luaopen_fann (lua_State *L); +void luaopen_sqlite3 (lua_State *L); gint rspamd_lua_call_filter (const gchar *function, struct rspamd_task *task); gint rspamd_lua_call_chain_filter (const gchar *function, diff --git a/src/lua/lua_sqlite3.c b/src/lua/lua_sqlite3.c index ac650ca97..708a74452 100644 --- a/src/lua/lua_sqlite3.c +++ b/src/lua/lua_sqlite3.c @@ -343,7 +343,7 @@ static gint lua_load_sqlite3 (lua_State * L) { lua_newtable (L); - luaL_register (L, NULL, sqlitelib_m); + luaL_register (L, NULL, sqlitelib_f); return 1; } @@ -364,7 +364,7 @@ luaopen_sqlite3 (lua_State * L) lua_pushstring (L, "rspamd{sqlite3}"); lua_rawset (L, -3); - luaL_register (L, NULL, sqlitelib_f); + luaL_register (L, NULL, sqlitelib_m); lua_pop (L, 1); luaL_newmetatable (L, "rspamd{sqlite3_stmt}"); |