Browse Source

Save classifier configuration inside statfile config.

tags/0.9.0
Vsevolod Stakhov 9 years ago
parent
commit
f636cc6c4e

+ 1
- 0
src/libserver/cfg_file.h View File

@@ -113,6 +113,7 @@ struct rspamd_statfile_config {
ucl_object_t *opts; /**< other options */
gboolean is_spam; /**< spam flag */
const gchar *backend; /**< name of statfile's backend */
struct rspamd_classifier_config *clcf; /**< parent pointer of classifier configuration */
gpointer data; /**< opaque data */
};


+ 1
- 0
src/libserver/cfg_rcl.c View File

@@ -906,6 +906,7 @@ rspamd_rcl_statfile_handler (rspamd_mempool_t *pool, const ucl_object_t *obj,
}

st->opts = (ucl_object_t *)obj;
st->clcf = ccf;

val = ucl_object_find_key (obj, "spam");
if (val == NULL) {

+ 1
- 1
src/libstat/tokenizers/tokenizers.c View File

@@ -72,7 +72,7 @@ token_node_compare_func (gconstpointer a, gconstpointer b)
}

/* Get next word from specified f_str_t buf */
gchar *
static gchar *
rspamd_tokenizer_get_word (rspamd_fstring_t * buf, rspamd_fstring_t * token, GList **exceptions)
{
gsize remain, pos;

+ 0
- 3
src/libstat/tokenizers/tokenizers.h View File

@@ -22,9 +22,6 @@ struct rspamd_stat_tokenizer {
/* Compare two token nodes */
int token_node_compare_func (gconstpointer a, gconstpointer b);

/* Get next word from specified f_str_t buf */
gchar * rspamd_tokenizer_get_word (rspamd_fstring_t *buf,
rspamd_fstring_t *token, GList **exceptions);

/* Tokenize text into array of words (rspamd_fstring_t type) */
GArray * rspamd_tokenize_text (gchar *text, gsize len, gboolean is_utf,

Loading…
Cancel
Save