diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-08-22 21:41:48 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-08-22 21:41:48 +0400 |
commit | b90267a71cc8cdc8b38675322ef9fa7a9cb5468c (patch) | |
tree | 3bff8af523d19ec9cff93134b067fc404795000d /src/classifiers/winnow.c | |
parent | ed224e6a3530f54b5993e39066a8397d54e9517e (diff) | |
download | rspamd-b90267a71cc8cdc8b38675322ef9fa7a9cb5468c.tar.gz rspamd-b90267a71cc8cdc8b38675322ef9fa7a9cb5468c.zip |
* Rework thread pools locking logic to avoid global lua mutex usage.
Fixed several memory leaks with modern glib.
Fixed memory leak in dkim code.
Fixed a problem with static global variables in shared libraries.
Diffstat (limited to 'src/classifiers/winnow.c')
-rw-r--r-- | src/classifiers/winnow.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/classifiers/winnow.c b/src/classifiers/winnow.c index 32c17e8bc..498ea6373 100644 --- a/src/classifiers/winnow.c +++ b/src/classifiers/winnow.c @@ -193,7 +193,7 @@ winnow_init (memory_pool_t * pool, struct classifier_config *cfg) } gboolean -winnow_classify (struct classifier_ctx *ctx, statfile_pool_t * pool, GTree * input, struct worker_task *task) +winnow_classify (struct classifier_ctx *ctx, statfile_pool_t * pool, GTree * input, struct worker_task *task, lua_State *L) { struct winnow_callback_data data; char *sumbuf, *value; @@ -221,7 +221,7 @@ winnow_classify (struct classifier_ctx *ctx, statfile_pool_t * pool, GTree * inp } } - cur = call_classifier_pre_callbacks (ctx->cfg, task, FALSE, FALSE); + cur = call_classifier_pre_callbacks (ctx->cfg, task, FALSE, FALSE, L); if (cur) { memory_pool_add_destructor (task->task_pool, (pool_destruct_func)g_list_free, cur); } @@ -261,7 +261,7 @@ winnow_classify (struct classifier_ctx *ctx, statfile_pool_t * pool, GTree * inp if (sel != NULL) { #ifdef WITH_LUA - max = call_classifier_post_callbacks (ctx->cfg, task, max); + max = call_classifier_post_callbacks (ctx->cfg, task, max, L); #endif #ifdef HAVE_TANHL max = tanhl (max); @@ -593,7 +593,7 @@ end: gboolean winnow_learn_spam (struct classifier_ctx* ctx, statfile_pool_t *pool, - GTree *input, struct worker_task *task, gboolean is_spam, GError **err) + GTree *input, struct worker_task *task, gboolean is_spam, lua_State *L, GError **err) { g_set_error (err, winnow_error_quark(), /* error domain */ |