aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
authorMikhail Galanin <mgalanin@mimecast.com>2018-08-17 16:45:12 +0100
committerMikhail Galanin <mgalanin@mimecast.com>2018-08-17 16:45:12 +0100
commit3b5ba9b74e772d9de998350c03e10fb621dc7a3e (patch)
tree2c28ac85784de96b5406835f713ea1dde307282e /src/lua
parent7eec047b37de8aacaba8d23f6e211cc4ce680b4d (diff)
downloadrspamd-3b5ba9b74e772d9de998350c03e10fb621dc7a3e.tar.gz
rspamd-3b5ba9b74e772d9de998350c03e10fb621dc7a3e.zip
[Minor] Better naming: lua_rspamd_dns -> lua_dns
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/CMakeLists.txt2
-rw-r--r--src/lua/lua_common.c2
-rw-r--r--src/lua/lua_common.h2
-rw-r--r--src/lua/lua_dns.c (renamed from src/lua/lua_rspamd_dns.c)14
4 files changed, 10 insertions, 10 deletions
diff --git a/src/lua/CMakeLists.txt b/src/lua/CMakeLists.txt
index 98a8203c3..0d22027ce 100644
--- a/src/lua/CMakeLists.txt
+++ b/src/lua/CMakeLists.txt
@@ -27,6 +27,6 @@ SET(LUASRC ${CMAKE_CURRENT_SOURCE_DIR}/lua_common.c
${CMAKE_CURRENT_SOURCE_DIR}/lua_cryptobox.c
${CMAKE_CURRENT_SOURCE_DIR}/lua_map.c
${CMAKE_CURRENT_SOURCE_DIR}/lua_thread_pool.c
- ${CMAKE_CURRENT_SOURCE_DIR}/lua_rspamd_dns.c)
+ ${CMAKE_CURRENT_SOURCE_DIR}/lua_dns.c)
SET(RSPAMD_LUA ${LUASRC} PARENT_SCOPE) \ No newline at end of file
diff --git a/src/lua/lua_common.c b/src/lua/lua_common.c
index d926fa32e..f446ec9e8 100644
--- a/src/lua/lua_common.c
+++ b/src/lua/lua_common.c
@@ -740,7 +740,7 @@ rspamd_lua_init ()
luaopen_fann (L);
luaopen_sqlite3 (L);
luaopen_cryptobox (L);
- luaopen_rspamd_dns (L);
+ luaopen_dns (L);
luaL_newmetatable (L, "rspamd{ev_base}");
lua_pushstring (L, "class");
diff --git a/src/lua/lua_common.h b/src/lua/lua_common.h
index e6ba4af83..0a9527bb0 100644
--- a/src/lua/lua_common.h
+++ b/src/lua/lua_common.h
@@ -280,7 +280,7 @@ void luaopen_html (lua_State * L);
void luaopen_fann (lua_State *L);
void luaopen_sqlite3 (lua_State *L);
void luaopen_cryptobox (lua_State *L);
-void luaopen_rspamd_dns (lua_State *L);
+void luaopen_dns (lua_State *L);
void rspamd_lua_dostring (const gchar *line);
diff --git a/src/lua/lua_rspamd_dns.c b/src/lua/lua_dns.c
index 3fee5bb7f..0d12a137c 100644
--- a/src/lua/lua_rspamd_dns.c
+++ b/src/lua/lua_dns.c
@@ -24,7 +24,7 @@ static const struct luaL_reg dns_f[] = {
};
void
-lua_rspamd_dns_callback (struct rdns_reply *reply, void *arg);
+lua_dns_callback (struct rdns_reply *reply, void *arg);
struct lua_rspamd_dns_cbdata {
struct thread_entry *thread;
@@ -99,14 +99,14 @@ lua_dns_request (lua_State *L)
if (forced) {
ret = make_dns_request_task_forced (task,
- lua_rspamd_dns_callback,
+ lua_dns_callback,
cbdata,
type,
to_resolve);
}
else {
ret = make_dns_request_task (task,
- lua_rspamd_dns_callback,
+ lua_dns_callback,
cbdata,
type,
to_resolve);
@@ -126,7 +126,7 @@ lua_dns_request (lua_State *L)
}
void
-lua_rspamd_dns_callback (struct rdns_reply *reply, void *arg)
+lua_dns_callback (struct rdns_reply *reply, void *arg)
{
struct lua_rspamd_dns_cbdata *cbdata = arg;
lua_State *L = cbdata->thread->lua_state;
@@ -155,7 +155,7 @@ lua_rspamd_dns_callback (struct rdns_reply *reply, void *arg)
}
static gint
-lua_load_rspamd_dns (lua_State * L)
+lua_load_dns (lua_State *L)
{
lua_newtable (L);
luaL_register (L, NULL, dns_f);
@@ -164,7 +164,7 @@ lua_load_rspamd_dns (lua_State * L)
}
void
-luaopen_rspamd_dns (lua_State * L)
+luaopen_dns (lua_State *L)
{
- rspamd_lua_add_preload (L, "rspamd_dns", lua_load_rspamd_dns);
+ rspamd_lua_add_preload (L, "rspamd_dns", lua_load_dns);
}