}
/* If uptime is less than 1 minute print only seconds */
else if (seconds / 60 == 0) {
- rspamd_printf ("%L second%s\n", (gint)seconds,
+ rspamd_printf ("%L second%s\n", seconds,
(gint)seconds > 1 ? "s" : "");
}
/* Else print the minutes and seconds. */
}
if (!found) {
- msg_info_session ("map not found: %d", id);
+ msg_info_session ("map not found: %L", id);
rspamd_controller_send_error (conn_ent, 404, "Map id not found");
return 0;
}
else {
/* Discard input */
server_stat->fuzzy_hashes_checked[RSPAMD_FUZZY_EPOCH6]++;
- msg_debug ("invalid fuzzy command of size %d received", r);
+ msg_debug ("invalid fuzzy command of size %z received", r);
}
REF_RELEASE (session);
guint8 *p;
if (data->len < 24) {
- msg_info_task ("bad png detected (maybe striped): <%s>", task->message_id);
+ msg_info_task ("bad png detected (maybe striped)");
return NULL;
}
/* Skip signature and read header section */
p = data->data + 12;
if (memcmp (p, "IHDR", 4) != 0) {
- msg_info_task ("png doesn't begins with IHDR section", task->message_id);
+ msg_info_task ("png doesn't begins with IHDR section");
return NULL;
}
guint16 t;
if (data->len < 10) {
- msg_info_task ("bad gif detected (maybe striped): <%s>", task->message_id);
+ msg_info_task ("bad gif detected (maybe striped)");
return NULL;
}
guint8 *p;
if (data->len < 28) {
- msg_info_task ("bad bmp detected (maybe striped): <%s>", task->message_id);
+ msg_info_task ("bad bmp detected (maybe striped)");
return NULL;
}
if (G_UNLIKELY (param->re->is_test)) {
msg_info_task ("process test regexp %s for url %s returned FALSE",
- struri (url));
+ param->re->regexp_text, struri (url));
}
}
session->temp_name = rspamd_mempool_alloc (session->pool, r);
rspamd_snprintf (session->temp_name,
r,
- "%s%crspamd-XXXXXX",
- session->cfg->temp_dir,
- G_DIR_SEPARATOR);
+ "%s/rspamd-XXXXXX",
+ session->cfg->temp_dir);
#ifdef HAVE_MKSTEMP
/* Umask is set before */
session->temp_fd = mkstemp (session->temp_name);
rspamd_snprintf (keybuf, sizeof (keybuf), "%s%s", sk, pk);
}
else {
- rspamd_snprintf (keybuf, sizeof (keybuf), "%*s%s", sem - sk, sk, pk);
+ rspamd_snprintf (keybuf, sizeof (keybuf), "%*s%s", (gint)(sem - sk),
+ sk, pk);
}
key = rspamd_http_connection_make_key (keybuf, strlen (keybuf));
if (g_hash_table_lookup (cfg->metrics_symbols, symbol) != NULL &&
!rewrite_existing) {
- msg_debug_config ("symbol %s has been already registered, do not override");
+ msg_debug_config ("symbol %s has been already registered, do not override",
+ symbol);
return FALSE;
}
priority = strtoul (p, &err, 10);
if (err != NULL && *err != '\0') {
msg_info_config (
- "bad character '%x', must be 'm' or 's' or a numeric priority",
+ "bad character '%xc', must be 'm' or 's' or a numeric priority",
*err);
}
}
else {
shingle_values[i] = -1;
}
- msg_debug_fuzzy_backend ("looking for shingle %d -> %L: %d", i,
+ msg_debug_fuzzy_backend ("looking for shingle %L -> %L: %d", i,
shcmd->sgl.hashes[i], rc);
}
rspamd_fuzzy_backend_cleanup_stmt (backend,
rspamd_fuzzy_backend_run_stmt (backend,
RSPAMD_FUZZY_BACKEND_INSERT_SHINGLE,
shcmd->sgl.hashes[i], i, id);
- msg_debug_fuzzy_backend ("add shingle %d -> %L: %d",
+ msg_debug_fuzzy_backend ("add shingle %d -> %L: %L",
i,
shcmd->sgl.hashes[i],
id);
IF_HEADER (RCPT_HEADER) {
if (!rspamd_task_add_recipient (task,
rspamd_mempool_ftokdup (task->task_pool, hv_tok))) {
- msg_err_task ("bad from header: '%V'", h->value);
+ msg_err_task ("bad from header: '%T'", h->value);
}
debug_task ("read rcpt header, value: %V", hv);
}
"<%s>: spf error for domain %s: bad spf record version: %*s",
rec->task->message_id,
rec->sender_domain,
- sizeof (SPF_VER1_STR) - 1,
+ (gint)sizeof (SPF_VER1_STR) - 1,
begin);
return FALSE;
}
task->msg.len = len;
if (task->msg.len == 0) {
- msg_warn_task ("message has invalid message length: %ud",
+ msg_warn_task ("message has invalid message length: %uz",
task->msg.len);
g_set_error (&task->err, rspamd_task_quark(), RSPAMD_PROTOCOL_ERROR,
"Invalid length");
if (task->flags & RSPAMD_TASK_FLAG_HAS_CONTROL) {
/* We have control chunk, so we need to process it separately */
if (task->msg.len < task->message_len) {
- msg_warn_task ("message has invalid message length: %ud and total len: %ud",
+ msg_warn_task ("message has invalid message length: %ul and total len: %ul",
task->message_len, task->msg.len);
g_set_error (&task->err, rspamd_task_quark(), RSPAMD_PROTOCOL_ERROR,
"Invalid length");
task->processed_stages |= RSPAMD_TASK_STAGE_DONE;
}
- msg_debug_task ("task is processed", st);
+ msg_debug_task ("task is processed");
return ret;
}
if (cl_runtime->clcf->max_tokens > 0 &&
cl_runtime->processed_tokens > cl_runtime->clcf->max_tokens) {
- msg_debug_task ("<%s> contains more tokens than allowed for %s classifier: "
- "%ud > %ud", cbdata->task, cl_runtime->clcf->name,
+ msg_debug_task ("message contains more tokens than allowed for %s classifier: "
+ "%uL > %ud", cl_runtime->clcf->name,
cl_runtime->processed_tokens,
cl_runtime->clcf->max_tokens);
if (cl_runtime->clcf->max_tokens > 0 &&
cl_runtime->processed_tokens > cl_runtime->clcf->max_tokens) {
- msg_debug_task ("<%s> contains more tokens than allowed for %s classifier: "
- "%ud > %ud", cbdata->task, cl_runtime->clcf->name,
+ msg_debug_task ("message contains more tokens than allowed for %s classifier: "
+ "%uL > %ud", cl_runtime->clcf->name,
cl_runtime->processed_tokens,
cl_runtime->clcf->max_tokens);
key = rspamd_decode_base32 (ucl_object_tostring (elt),
0, &keylen);
if (keylen < sizeof (rspamd_sipkey_t)) {
- msg_warn ("siphash key is too short: %s", keylen);
+ msg_warn ("siphash key is too short: %z", keylen);
g_free (key);
}
else {
break;
case process_signature:
if (*p == '\r' || *p == '\n') {
- msg_debug ("signature found: %*s", siglen, sig);
+ msg_debug ("signature found: %*s", (gint)siglen, sig);
return FALSE;
}
else if (*p != ' ' && *p != '-' && *p != '_') {
errno = ERANGE;
msg_warn ("cannot parse port: %s, error: %s",
tokens[1],
- *err_str,
strerror (errno));
hints.ai_flags ^= AI_NUMERICSERV;
}
mremain -= mr;
}
else {
- mr = rspamd_snprintf (m, mremain, ": ", function);
+ mr = rspamd_snprintf (m, mremain, ": ");
m += mr;
mremain -= mr;
}
g_hash_table_destroy (data->prev_data);
}
if (data->cur_data) {
- msg_info_pool ("read hash of %z elements", g_hash_table_size
+ msg_info_pool ("read hash of %d elements", g_hash_table_size
(data->cur_data));
}
}
g_hash_table_destroy (data->prev_data);
}
if (data->cur_data) {
- msg_info_pool ("read hash of %z elements", g_hash_table_size
+ msg_info_pool ("read hash of %d elements", g_hash_table_size
(data->cur_data));
}
}
while (node && kremain) {
if (node->skipped) {
msg_debug_radix ("finding in the compressed node: %p at level %d",
- node->value, cur_level);
+ (gpointer)node->value, cur_level);
/* It is obviously a leaf node */
if (radix_compare_compressed (node, key, keylen, cur_level)) {
return node->value;
msg_debug_radix ("finding value cur value: %p, left: %p, "
"right: %p, go %s, level: %d",
- node->value, node->d.n.left,
+ (gpointer)node->value, node->d.n.left,
node->d.n.right, (kv & bit) ? "right" : "left",
cur_level);
if (kv & bit) {
/* We still have a node but no more key, so we can search for skipped node */
if (node->skipped) {
msg_debug_radix ("finding in the compressed node: %p at level %d",
- node->value, cur_level);
+ (gpointer)node->value, cur_level);
/* It is obviously a leaf node */
if (radix_compare_compressed (node, key, keylen, cur_level)) {
return node->value;
}
msg_debug_radix ("uncompress path for node: %p, left: %p, "
- "right: %p, go %s", node->value, node->d.n.left,
+ "right: %p, go %s", (gpointer)node->value, node->d.n.left,
node->d.n.right, (*nkey & bit) ? "right" : "left");
bit >>= 1;
/* Attach leaf node, that was previously a compressed node */
msg_debug_radix ("attach leaf node to %s with value %p", (*nkey & bit) ? "right" : "left",
- leaf->value);
+ (gpointer)leaf->value);
if (*nkey & bit) {
node->d.n.right = leaf;
node->d.n.left = NULL;
}
node->value = value;
msg_debug_radix ("insert new leaf node with value %p to level %d",
- value, level);
+ (gpointer)value, level);
return node;
}
oldval = node->value;
node->value = value;
msg_debug_radix ("replace value for leaf node with: %p, old value: %p",
- value, oldval);
+ (gpointer)value, (gpointer)oldval);
}
else {
oldval = node->value;
node->value = value;
msg_debug_radix ("replace value for node with: %p, old value: %p",
- value, oldval);
+ (gpointer)value, (gpointer)oldval);
}
return oldval;
* - otherwise we insert new compressed leaf node
*/
if (cur_level == target_level) {
- msg_debug_radix ("insert detached leaf node with value: %p", value);
+ msg_debug_radix ("insert detached leaf node with value: %p",
+ (gpointer)value);
nnode->value = value;
}
else if (masked) {
leaf = nnode->d.n.right;
}
msg_debug_radix ("move leaf node with value: %p, to level %ud, "
- "set leaf node value to %p and level %ud", nnode->value,
- cur_level, value, target_level);
+ "set leaf node value to %p and level %ud", (gpointer)nnode->value,
+ cur_level,
+ (gpointer)value, target_level);
radix_move_up_compressed_leaf (tree, leaf, nnode, value, key, keylen,
target_level);
}
g_assert (keybits >= masklen);
msg_debug_radix ("want insert value %p with mask %z, key: %*xs",
- value, masklen, (int)keylen, key);
+ (gpointer)value, masklen, (int)keylen, key);
node = tree->root;
next = node;
tree->size ++;
}
else if (next->value == RADIX_NO_VALUE) {
- msg_debug_radix ("insert value node with %p", value);
+ msg_debug_radix ("insert value node with %p", (gpointer)value);
next->value = value;
tree->size ++;
}
target_level, value, TRUE);
*prev = next;
msg_debug_radix ("move leaf node with value: %p, to level %ud, "
- "set leaf node value to %p and level %ud", next->value,
- cur_level, value, target_level);
+ "set leaf node value to %p and level %ud", (gpointer)next->value,
+ cur_level,
+ (gpointer)value, target_level);
next->skipped = FALSE;
if (*k & bit) {
next->d.n.right = node;
rspamd_strlcpy (file->pdp_prep[i].last_ds, "U",
sizeof (file->pdp_prep[i].last_ds));
pdp_new[i] = NAN;
- msg_debug_rrd ("adding unknown point interval %.3f is less than heartbeat %.3f",
+ msg_debug_rrd ("adding unknown point interval %.3f is less than heartbeat %l",
interval, file->ds_def[i].par[RRD_DS_mrhb_cnt].lv);
}
else {
rra_steps[i] = 0;
}
- msg_debug_rrd ("cdp: %d, rra steps: %d(%d), pdp steps: %d",
+ msg_debug_rrd ("cdp: %ud, rra steps: %ul(%ul), pdp steps: %ul",
i, rra_steps[i], pdp_offset, pdp_steps);
/* Update this specific CDP */
if (file->stat_head->ds_cnt != 4 || file->stat_head->rra_cnt != 4) {
msg_err_rrd ("rrd file is not suitable for rspamd: it has "
- "%d ds and %d rra", file->stat_head->ds_cnt,
+ "%ul ds and %ul rra", file->stat_head->ds_cnt,
file->stat_head->rra_cnt);
g_set_error (err, rrd_error_quark (), EINVAL, "bad rrd file");
rspamd_rrd_close (file);
if (r == -1) {
msg_warn ("socketpair failed: %d, '%s'", errno, strerror (
- errno), pair[0], pair[1]);
+ errno));
return -1;
}
break;
case LUA_TBOOLEAN: /* booleans */
- r += rspamd_snprintf (buf + r, sizeof (buf) - r,lua_toboolean (L,
- i) ? "bool: true" : "bool: false");
+ r += rspamd_snprintf (buf + r, sizeof (buf) - r,
+ lua_toboolean (L, i) ? "bool: true" : "bool: false");
break;
case LUA_TNUMBER: /* numbers */
{
struct lua_xmlrpc_ud *ud = user_data;
- msg_err ("xmlrpc parser error: %s", error->message, ud->parser_state);
+ msg_err ("xmlrpc parser error: %s", error->message);
}
static gint
if (part->words == NULL || part->words->len == 0) {
msg_info_task ("<%s>, part hash empty, skip fuzzy check",
- task->message_id, fuzzy_module_ctx->min_hash_len);
+ task->message_id);
continue;
}
g_assert (pbkdf != NULL);
if (encrypted_pwd->len < pbkdf->salt_len + pbkdf->key_len + 3) {
- msg_err ("incorrect salt: password length: %d, must be at least %z characters",
+ msg_err ("incorrect salt: password length: %z, must be at least %z characters",
encrypted_pwd->len, pbkdf->salt_len);
exit (EXIT_FAILURE);
}