rspamd_controller_lua_fin_task (void *ud)
{
struct rspamd_task *task = ud;
- struct rspamd_controller_session *session;
struct rspamd_http_connection_entry *conn_ent;
conn_ent = task->fin_arg;
- session = conn_ent->ud;
if (task->err != NULL) {
rspamd_controller_send_error (conn_ent, task->err->code, "%s",
struct fuzzy_session *session = ud;
gboolean encrypted = FALSE, is_shingle = FALSE;
struct rspamd_fuzzy_cmd *cmd = NULL;
- gsize up_len = 0;
switch (session->cmd_type) {
case CMD_NORMAL:
cmd = &session->cmd.normal;
- up_len = sizeof (session->cmd.normal);
break;
case CMD_SHINGLE:
cmd = &session->cmd.shingle.basic;
- up_len = sizeof (session->cmd.shingle);
is_shingle = TRUE;
break;
case CMD_ENCRYPTED_NORMAL:
cmd = &session->cmd.enc_normal.cmd;
- up_len = sizeof (session->cmd.normal);
encrypted = TRUE;
break;
case CMD_ENCRYPTED_SHINGLE:
cmd = &session->cmd.enc_shingle.cmd.basic;
- up_len = sizeof (session->cmd.shingle);
encrypted = TRUE;
is_shingle = TRUE;
break;
struct rspamd_mime_text_part *part)
{
- const guchar *p, *c, *end;
+ const guchar *p, *end;
guint i;
goffset off;
struct rspamd_process_exception *ex;
part->stripped_content = g_byte_array_sized_new (part->content->len);
part->newlines = g_ptr_array_sized_new (128);
p = part->content->data;
- c = p;
end = p + part->content->len;
rspamd_strip_newlines_parse (p, end, part->stripped_content,
rspamd_dkim_key_t *key,
struct rspamd_task *task)
{
- const gchar *p, *body_end, *body_start;
+ const gchar *body_end, *body_start;
guchar raw_digest[EVP_MAX_MD_SIZE];
EVP_MD_CTX *cpy_ctx;
gsize dlen;
g_return_val_if_fail (task->msg.len > 0, DKIM_ERROR);
/* First of all find place of body */
- p = task->msg.begin;
body_end = task->msg.begin + task->msg.len;
body_start = task->raw_headers_content.body_start;
{
GString *hdr;
struct rspamd_dkim_header *dh;
- const gchar *p, *body_end, *body_start;
+ const gchar *body_end, *body_start;
guchar raw_digest[EVP_MAX_MD_SIZE];
gsize dlen;
guint i, j;
g_assert (ctx != NULL);
/* First of all find place of body */
- p = task->msg.begin;
body_end = task->msg.begin + task->msg.len;
body_start = task->raw_headers_content.body_start;
const gchar *name;
};
-const static struct rspamd_html_colorname html_colornames[] = {
+static const struct rspamd_html_colorname html_colornames[] = {
{ {240, 248, 255}, "aliceblue"},
{ {250, 235, 215}, "antiquewhite"},
{ {255, 239, 219}, "antiquewhite1"},
GQuark type;
type = g_quark_try_string ("log_helper");
+ (void)type;
ctx = rspamd_mempool_alloc (cfg->cfg_pool, sizeof (*ctx));
ctx->magic = rspamd_log_helper_magic;
rspamd_stat_token_t *w,
gboolean is_url)
{
- const gchar *p, *end, *c;
+ const gchar *p, *end;
gdouble badness = 0.0;
UChar32 uc;
UBlockCode sc, last_sc;
p = w->begin;
end = p + w->len;
- c = p;
last_sc = 0;
/* We assume that w is normalized */
rspamd_stat_token_t *w,
gboolean is_url)
{
- const guchar *p, *end, *c;
+ const guchar *p, *end;
gdouble badness = 0.0;
enum {
ascii = 1,
p = w->begin;
end = p + w->len;
- c = p;
last_sc = 0;
if (w->len > chartable_module_ctx->max_word_len) {
dkim_module_config (struct rspamd_config *cfg)
{
const ucl_object_t *value;
- gint res = TRUE, cb_id = -1, check_id = -1;
+ gint res = TRUE, cb_id = -1;
guint cache_size;
gboolean got_trusted = FALSE;
dkim_module_ctx->dkim_pool,
dkim_module_ctx->sign_condition_ref);
- check_id = rspamd_symbols_cache_add_symbol (cfg->cache,
+ rspamd_symbols_cache_add_symbol (cfg->cache,
"DKIM_SIGN",
0,
dkim_sign_callback,
const gchar **charset, gsize *charset_len,
const gchar **encoded, gsize *encoded_len)
{
- const char *p = in, *pe = in + len, *eof,
+ const char *p = in, *pe = in + len,
*encoded_start = NULL, *encoded_end = NULL,
*charset_start = NULL, *charset_end = NULL;
gint encoding = RSPAMD_RFC2047_QP, cs = 0;
- eof = pe;
-
%% write init;
%% write exec;