aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Galanin <mgalanin@mimecast.com>2018-08-17 16:41:30 +0100
committerMikhail Galanin <mgalanin@mimecast.com>2018-08-17 16:41:30 +0100
commit7eec047b37de8aacaba8d23f6e211cc4ce680b4d (patch)
tree6675d58f302f82c0742e5b3046d470b9b5a5ca43
parent46b69af3b0dde1b24b518d92668e1073f674efb2 (diff)
downloadrspamd-7eec047b37de8aacaba8d23f6e211cc4ce680b4d.tar.gz
rspamd-7eec047b37de8aacaba8d23f6e211cc4ce680b4d.zip
[Minor] Better naming: renamed old module - lua_dns -> lua_dns_resolver
-rw-r--r--src/lua/CMakeLists.txt2
-rw-r--r--src/lua/lua_dns_resolver.c (renamed from src/lua/lua_dns.c)36
-rw-r--r--src/lua/lua_dns_resolver.h (renamed from src/lua/lua_dns.h)0
-rw-r--r--src/lua/lua_rspamd_dns.c2
4 files changed, 20 insertions, 20 deletions
diff --git a/src/lua/CMakeLists.txt b/src/lua/CMakeLists.txt
index cb2bd2232..98a8203c3 100644
--- a/src/lua/CMakeLists.txt
+++ b/src/lua/CMakeLists.txt
@@ -12,7 +12,7 @@ SET(LUASRC ${CMAKE_CURRENT_SOURCE_DIR}/lua_common.c
${CMAKE_CURRENT_SOURCE_DIR}/lua_redis.c
${CMAKE_CURRENT_SOURCE_DIR}/lua_upstream.c
${CMAKE_CURRENT_SOURCE_DIR}/lua_mempool.c
- ${CMAKE_CURRENT_SOURCE_DIR}/lua_dns.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/lua_dns_resolver.c
${CMAKE_CURRENT_SOURCE_DIR}/lua_rsa.c
${CMAKE_CURRENT_SOURCE_DIR}/lua_ip.c
${CMAKE_CURRENT_SOURCE_DIR}/lua_expression.c
diff --git a/src/lua/lua_dns.c b/src/lua/lua_dns_resolver.c
index 5c056b71f..dc475f2ae 100644
--- a/src/lua/lua_dns.c
+++ b/src/lua/lua_dns_resolver.c
@@ -135,7 +135,7 @@ lua_dns_get_type (lua_State *L, int argno)
}
static void
-lua_dns_callback (struct rdns_reply *reply, gpointer arg)
+lua_dns_resolver_callback (struct rdns_reply *reply, gpointer arg)
{
struct lua_dns_cbdata *cd = arg;
struct rspamd_dns_resolver **presolver;
@@ -379,13 +379,13 @@ lua_dns_resolver_resolve_common (lua_State *L,
}
if (task == NULL) {
- if (make_dns_request (resolver,
- session,
- pool,
- lua_dns_callback,
- cbdata,
- type,
- to_resolve)) {
+ if ( make_dns_request (resolver,
+ session,
+ pool,
+ lua_dns_resolver_callback,
+ cbdata,
+ type,
+ to_resolve)) {
lua_pushboolean (L, TRUE);
@@ -404,17 +404,17 @@ lua_dns_resolver_resolve_common (lua_State *L,
if (forced) {
ret = make_dns_request_task_forced (task,
- lua_dns_callback,
- cbdata,
- type,
- to_resolve);
+ lua_dns_resolver_callback,
+ cbdata,
+ type,
+ to_resolve);
}
else {
ret = make_dns_request_task (task,
- lua_dns_callback,
- cbdata,
- type,
- to_resolve);
+ lua_dns_resolver_callback,
+ cbdata,
+ type,
+ to_resolve);
}
if (ret) {
@@ -592,7 +592,7 @@ lua_dns_resolver_resolve (lua_State *L)
}
static gint
-lua_load_dns (lua_State * L)
+lua_load_dns_resolver (lua_State *L)
{
lua_newtable (L);
luaL_register (L, NULL, dns_resolverlib_f);
@@ -625,7 +625,7 @@ luaopen_dns_resolver (lua_State * L)
}
luaL_register (L, NULL, dns_resolverlib_m);
- rspamd_lua_add_preload (L, "rspamd_resolver", lua_load_dns);
+ rspamd_lua_add_preload (L, "rspamd_resolver", lua_load_dns_resolver);
lua_pop (L, 1); /* remove metatable from stack */
}
diff --git a/src/lua/lua_dns.h b/src/lua/lua_dns_resolver.h
index f5c71aa0b..f5c71aa0b 100644
--- a/src/lua/lua_dns.h
+++ b/src/lua/lua_dns_resolver.h
diff --git a/src/lua/lua_rspamd_dns.c b/src/lua/lua_rspamd_dns.c
index 9c3764c06..3fee5bb7f 100644
--- a/src/lua/lua_rspamd_dns.c
+++ b/src/lua/lua_rspamd_dns.c
@@ -12,7 +12,7 @@
* limitations under the License.
*/
#include "lua_common.h"
-#include "lua_dns.h"
+#include "lua_dns_resolver.h"
#include "lua_thread_pool.h"
LUA_FUNCTION_DEF (dns, request);