return 0;
}
-
idstr = rspamd_http_message_find_header (msg, "Map");
if (idstr == NULL) {
return TRUE;
}
/* Successful learn */
+ msg_info ("<%s> learned message: %s",
+ rspamd_inet_address_to_string (&session->from_addr),
+ task->message_id);
rspamd_controller_send_string (conn_ent, "{\"success\":true}");
return TRUE;
struct rspamd_controller_worker_ctx *ctx;
const gchar *error;
gdouble score;
- gint i;
+ gint i, added = 0;
enum rspamd_metric_action act;
ctx = session->ctx;
score = ucl_object_todouble (cur);
if (metric->actions[act].score != score) {
add_dynamic_action (ctx->cfg, DEFAULT_METRIC, act, score);
+ added ++;
}
}
dump_dynamic_config (ctx->cfg);
+ msg_info ("<%s> modified %d actions",
+ rspamd_inet_address_to_string (&session->from_addr),
+ added);
rspamd_controller_send_string (conn_ent, "{\"success\":true}");
const gchar *error;
gdouble val;
struct symbol *sym;
+ int added = 0;
ctx = session->ctx;
ucl_object_unref (obj);
return 0;
}
+ added ++;
}
}
dump_dynamic_config (ctx->cfg);
+ msg_info ("<%s> modified %d symbols",
+ rspamd_inet_address_to_string (&session->from_addr),
+ added);
rspamd_controller_send_string (conn_ent, "{\"success\":true}");
return 0;
}
+ msg_info ("<%s>, map %s saved",
+ rspamd_inet_address_to_string (&session->from_addr),
+ map->uri);
/* Close and unlock */
close (fd);
g_atomic_int_set (map->locked, 0);
return 0;
}
+ msg_info ("<%s> reset stat",
+ rspamd_inet_address_to_string (&session->from_addr));
return rspamd_controller_handle_stat_common (conn_ent, msg, TRUE);
}
return;
}
- msg_info ("accepted connection from %s port %d",
- rspamd_inet_address_to_string (&addr),
- rspamd_inet_address_get_port (&addr));
-
nsession = g_slice_alloc0 (sizeof (struct rspamd_controller_session));
nsession->pool = rspamd_mempool_new (rspamd_mempool_suggest_size ());
nsession->ctx = ctx;
rspamd_http_connection_reset (entry->conn);
- msg_info ("requested file %s", realbuf);
+ msg_debug ("requested file %s", realbuf);
rspamd_http_connection_write_message (entry->conn, reply_msg, NULL,
rspamd_http_router_detect_ct (realbuf), entry, entry->conn->fd,
entry->rt->ptv, entry->rt->ev_base);
if (msg->url != NULL && msg->url->len != 0) {
found = g_hash_table_lookup (entry->rt->paths, msg->url->str);
memcpy (&handler, &found, sizeof (found));
- msg_info ("requested known path: %v", msg->url);
+ msg_debug ("requested known path: %v", msg->url);
}
entry->is_reply = TRUE;
if (handler != NULL) {
if (entry->rt->error_handler != NULL) {
entry->rt->error_handler (entry, err);
}
- msg_info ("requested unknown path: %v", msg->url);
+ msg_info ("path: %v not found", msg->url);
err_msg = rspamd_http_new_message (HTTP_RESPONSE);
err_msg->date = time (NULL);
err_msg->code = err->code;