diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-06-16 20:43:26 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-06-16 20:43:26 +0400 |
commit | a639bf512e3df778fa33c49d83c3996c9fe60d77 (patch) | |
tree | 072c4167dae82382b1c8eef93e0270339635e389 /src/lua/lua_task.c | |
parent | c4aab3053d2839e6d3b99f8a542b0a4f54f2b856 (diff) | |
download | rspamd-a639bf512e3df778fa33c49d83c3996c9fe60d77.tar.gz rspamd-a639bf512e3df778fa33c49d83c3996c9fe60d77.zip |
* Change metric logic
* Completely remove lex/yacc readers for config
* Make common sense of metric/action and symbols
* Sync changes with all plugins
TODO: add this to documentation
Diffstat (limited to 'src/lua/lua_task.c')
-rw-r--r-- | src/lua/lua_task.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c index dec415f9b..123cd048e 100644 --- a/src/lua/lua_task.c +++ b/src/lua/lua_task.c @@ -117,23 +117,22 @@ static int lua_task_insert_result (lua_State * L) { struct worker_task *task = lua_check_task (L); - const char *metric_name, *symbol_name, *param; + const char *symbol_name, *param; double flag; GList *params = NULL; int i, top; if (task != NULL) { - metric_name = memory_pool_strdup (task->task_pool, luaL_checkstring (L, 2)); - symbol_name = memory_pool_strdup (task->task_pool, luaL_checkstring (L, 3)); - flag = luaL_checknumber (L, 4); + symbol_name = memory_pool_strdup (task->task_pool, luaL_checkstring (L, 2)); + flag = luaL_checknumber (L, 3); top = lua_gettop (L); /* Get additional options */ - for (i = 5; i <= top; i++) { + for (i = 4; i <= top; i++) { param = luaL_checkstring (L, i); params = g_list_prepend (params, memory_pool_strdup (task->task_pool, param)); } - insert_result (task, metric_name, symbol_name, flag, params); + insert_result (task, symbol_name, flag, params); } return 1; } |