diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-08-09 14:27:33 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-08-09 15:27:32 +0100 |
commit | 084dc96bc564b814b7d8850958613cfae835dc77 (patch) | |
tree | a33bbbb6dac6c4277389478b154f2b4306eacb34 /src/lua/lua_map.c | |
parent | 0ebcb5c9fb90363a2afff95f3f1af827fcf9b287 (diff) | |
download | rspamd-084dc96bc564b814b7d8850958613cfae835dc77.tar.gz rspamd-084dc96bc564b814b7d8850958613cfae835dc77.zip |
[Feature] Add support for Lua API tracing
Diffstat (limited to 'src/lua/lua_map.c')
-rw-r--r-- | src/lua/lua_map.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lua/lua_map.c b/src/lua/lua_map.c index d3fc8edb9..5af724577 100644 --- a/src/lua/lua_map.c +++ b/src/lua/lua_map.c @@ -141,6 +141,7 @@ lua_check_map (lua_State * L, gint pos) gint lua_config_add_radix_map (lua_State *L) { + LUA_TRACE_POINT; struct rspamd_config *cfg = lua_check_config (L, 1); const gchar *map_line, *description; struct rspamd_lua_map *map, **pmap; @@ -181,6 +182,7 @@ lua_config_add_radix_map (lua_State *L) gint lua_config_radix_from_config (lua_State *L) { + LUA_TRACE_POINT; struct rspamd_config *cfg = lua_check_config (L, 1); const gchar *mname, *optname; const ucl_object_t *obj; @@ -246,6 +248,7 @@ lua_config_radix_from_config (lua_State *L) gint lua_config_radix_from_ucl (lua_State *L) { + LUA_TRACE_POINT; struct rspamd_config *cfg = lua_check_config (L, 1); ucl_object_t *obj; struct rspamd_lua_map *map, **pmap; @@ -301,6 +304,7 @@ lua_config_radix_from_ucl (lua_State *L) gint lua_config_add_hash_map (lua_State *L) { + LUA_TRACE_POINT; struct rspamd_config *cfg = lua_check_config (L, 1); const gchar *map_line, *description; struct rspamd_lua_map *map, **pmap; @@ -340,6 +344,7 @@ lua_config_add_hash_map (lua_State *L) gint lua_config_add_kv_map (lua_State *L) { + LUA_TRACE_POINT; struct rspamd_config *cfg = lua_check_config (L, 1); const gchar *map_line, *description; struct rspamd_lua_map *map, **pmap; @@ -468,6 +473,7 @@ lua_map_dtor (struct map_cb_data *data) gint lua_config_add_map (lua_State *L) { + LUA_TRACE_POINT; struct rspamd_config *cfg = lua_check_config (L, 1); const char *description = NULL; const gchar *type = NULL; @@ -657,6 +663,7 @@ lua_config_add_map (lua_State *L) gint lua_config_get_maps (lua_State*L) { + LUA_TRACE_POINT; struct rspamd_config *cfg = lua_check_config (L, 1); struct rspamd_lua_map *map, **pmap; struct rspamd_map *m; @@ -733,6 +740,7 @@ lua_map_process_string_key (lua_State *L, gint pos, gsize *len) static gint lua_map_get_key (lua_State * L) { + LUA_TRACE_POINT; struct rspamd_lua_map *map = lua_check_map (L, 1); struct rspamd_radix_map_helper *radix; struct rspamd_lua_ip *addr = NULL; @@ -895,6 +903,7 @@ lua_map_traverse_cb (gconstpointer key, static gint lua_map_get_stats (lua_State * L) { + LUA_TRACE_POINT; struct rspamd_lua_map *map = lua_check_map (L, 1); gboolean do_reset = FALSE; @@ -919,6 +928,7 @@ lua_map_get_stats (lua_State * L) static gint lua_map_get_data_digest (lua_State * L) { + LUA_TRACE_POINT; struct rspamd_lua_map *map = lua_check_map (L, 1); gchar numbuf[64]; @@ -936,6 +946,7 @@ lua_map_get_data_digest (lua_State * L) static gint lua_map_get_nelts (lua_State * L) { + LUA_TRACE_POINT; struct rspamd_lua_map *map = lua_check_map (L, 1); if (map != NULL) { @@ -951,6 +962,7 @@ lua_map_get_nelts (lua_State * L) static int lua_map_is_signed (lua_State *L) { + LUA_TRACE_POINT; struct rspamd_lua_map *map = lua_check_map (L, 1); gboolean ret = FALSE; struct rspamd_map_backend *bk; @@ -978,6 +990,7 @@ lua_map_is_signed (lua_State *L) static int lua_map_get_proto (lua_State *L) { + LUA_TRACE_POINT; struct rspamd_lua_map *map = lua_check_map (L, 1); const gchar *ret = "undefined"; struct rspamd_map_backend *bk; @@ -1014,6 +1027,7 @@ lua_map_get_proto (lua_State *L) static int lua_map_get_sign_key (lua_State *L) { + LUA_TRACE_POINT; struct rspamd_lua_map *map = lua_check_map (L, 1); struct rspamd_map_backend *bk; guint i; @@ -1050,6 +1064,7 @@ lua_map_get_sign_key (lua_State *L) static int lua_map_set_sign_key (lua_State *L) { + LUA_TRACE_POINT; struct rspamd_lua_map *map = lua_check_map (L, 1); struct rspamd_map_backend *bk; const gchar *pk_str; @@ -1089,6 +1104,7 @@ lua_map_set_sign_key (lua_State *L) static int lua_map_set_callback (lua_State *L) { + LUA_TRACE_POINT; struct rspamd_lua_map *map = lua_check_map (L, 1); if (!map || map->type != RSPAMD_LUA_MAP_CALLBACK || map->data.cbdata == NULL) { @@ -1109,6 +1125,7 @@ lua_map_set_callback (lua_State *L) static int lua_map_get_uri (lua_State *L) { + LUA_TRACE_POINT; struct rspamd_lua_map *map = lua_check_map (L, 1); const gchar *ret = "undefined"; struct rspamd_map_backend *bk; |