GString *key;
struct fuzzy_peer_cmd *io_cmd;
struct rspamd_fuzzy_cmd *cmd = NULL;
- guint nargs, ncommands, cur_shift;
+ guint nargs, cur_shift;
g_assert (backend != NULL);
* DECR <prefix||fuzzy_count>
*/
- ncommands = 3; /* For MULTI + EXEC + INCR <src> */
nargs = 4;
for (i = 0; i < updates->len; i ++) {
}
if (cmd->cmd == FUZZY_WRITE) {
- ncommands += 5;
nargs += 17;
session->nadded ++;
if (io_cmd->is_shingle) {
- ncommands += RSPAMD_SHINGLE_SIZE;
nargs += RSPAMD_SHINGLE_SIZE * 4;
}
}
else if (cmd->cmd == FUZZY_DEL) {
- ncommands += 2;
nargs += 4;
session->ndeleted ++;
if (io_cmd->is_shingle) {
- ncommands += RSPAMD_SHINGLE_SIZE;
nargs += RSPAMD_SHINGLE_SIZE * 2;
}
}
else if (cmd->cmd == FUZZY_REFRESH) {
- ncommands += 1;
nargs += 3;
session->nextended ++;
if (io_cmd->is_shingle) {
- ncommands += RSPAMD_SHINGLE_SIZE;
nargs += RSPAMD_SHINGLE_SIZE * 3;
}
}
opts & RSPAMD_HTTP_CLIENT_SSL);
if (conn) {
- struct rspamd_http_connection_private *priv;
-
- priv = conn->priv;
-
return conn;
}
*prob = G_MAXUINT64;
}
else {
- *prob = decay_prob * G_MAXUINT64;
+ *prob = (guint64)(decay_prob * (double)G_MAXUINT64);
}
return TRUE;
float t1, t2;
gdouble val;
gboolean calc_ticks = FALSE;
- const gchar *op_name = NULL;
+ __attribute__((unused)) const gchar *op_name = NULL;
elt = node->data;
break;
case ELT_OP:
g_assert (node->children != NULL);
+#ifdef DEBUG_EXPRESSIONS
op_name = rspamd_expr_op_to_str (elt->p.op.op);
+#endif
if (elt->p.op.op_flags & RSPAMD_EXPRESSION_NARY) {
msg_debug_expression_verbose ("proceed nary operation %s", op_name);
{
LUA_TRACE_POINT;
struct rspamd_mime_text_part *part = lua_check_textpart (L);
- struct rspamd_lua_text *t;
if (part == NULL || IS_TEXT_PART_EMPTY (part)) {
lua_pushnil (L);
LUA_TRACE_POINT;
rspamd_mempool_t *pool;
struct rspamd_lua_text *t;
- gboolean own_pool = FALSE;
struct rspamd_lua_url *u;
if (lua_type (L, 1) == LUA_TUSERDATA) {
t = lua_check_text_or_string (L, 2);
}
else {
- own_pool = TRUE;
pool = static_lua_url_pool;
t = lua_check_text_or_string (L, 2);
}
(new_spam - old_spam) / w->repeat,
(new_ham - old_ham) / w->repeat,
cnt > 0 ? sum / cnt : 0);
- setproctitle (proctitle);
+ setproctitle ("%s", proctitle);
}
memcpy (&old_stat, &cur_stat, sizeof (cur_stat));