diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-10-26 16:06:12 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-10-26 16:06:12 +0100 |
commit | 0c20729f33f07cdcef5f7c10bde04f262c4a4574 (patch) | |
tree | 66853c7d49a7e51715ce1bc73ab12998bc28c7a9 /src/lua/lua_dns.c | |
parent | 2ae394086bb5385ae4bc216cf694fe35692522a3 (diff) | |
download | rspamd-0c20729f33f07cdcef5f7c10bde04f262c4a4574.tar.gz rspamd-0c20729f33f07cdcef5f7c10bde04f262c4a4574.zip |
[Rework] Add more traces to async events, get rid of GQuarks
Diffstat (limited to 'src/lua/lua_dns.c')
-rw-r--r-- | src/lua/lua_dns.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/lua/lua_dns.c b/src/lua/lua_dns.c index da026a8a3..632ff6f1b 100644 --- a/src/lua/lua_dns.c +++ b/src/lua/lua_dns.c @@ -23,8 +23,9 @@ static const struct luaL_reg dns_f[] = { {NULL, NULL} }; -void -lua_dns_callback (struct rdns_reply *reply, void *arg); +static const gchar *M = "rspamd lua dns"; + +void lua_dns_callback (struct rdns_reply *reply, void *arg); struct lua_rspamd_dns_cbdata { struct thread_entry *thread; @@ -109,13 +110,13 @@ lua_dns_request (lua_State *L) if (task == NULL) { - ret = make_dns_request (cfg->dns_resolver, + ret = (make_dns_request (cfg->dns_resolver, session, pool, lua_dns_callback, cbdata, type, - to_resolve); + to_resolve) != NULL); } else { if (forced) { @@ -140,7 +141,7 @@ lua_dns_request (lua_State *L) if (task) { cbdata->item = rspamd_symbols_cache_get_cur_item (task); - rspamd_symcache_item_async_inc (task, cbdata->item); + rspamd_symcache_item_async_inc (task, cbdata->item, M); } return lua_thread_yield (cbdata->thread, 0); @@ -176,7 +177,7 @@ lua_dns_callback (struct rdns_reply *reply, void *arg) lua_thread_resume (cbdata->thread, 2); if (cbdata->item) { - rspamd_symcache_item_async_dec_check (cbdata->task, cbdata->item); + rspamd_symcache_item_async_dec_check (cbdata->task, cbdata->item, M); } } |