aboutsummaryrefslogtreecommitdiffstats
path: root/src/controller.c
diff options
context:
space:
mode:
authorAndrej Zverev <andrej.zverev@gmail.com>2010-06-28 18:02:31 +0400
committerAndrej Zverev <andrej.zverev@gmail.com>2010-06-28 18:02:31 +0400
commitc4d958dd3ff00aac75e15da0f80527333b9b1fdd (patch)
tree954db91287e4e09e30f46b2e38c53262ccdff1fe /src/controller.c
parentc62e1b2350180d131f4dfbf73a3e3cd2b86d1f9b (diff)
downloadrspamd-c4d958dd3ff00aac75e15da0f80527333b9b1fdd.tar.gz
rspamd-c4d958dd3ff00aac75e15da0f80527333b9b1fdd.zip
* Announce weights and sync
* Fix few typo
Diffstat (limited to 'src/controller.c')
-rw-r--r--src/controller.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/controller.c b/src/controller.c
index f94088e8a..531f605db 100644
--- a/src/controller.c
+++ b/src/controller.c
@@ -263,7 +263,7 @@ process_sync_command (struct controller_session *session, char **args)
}
rev = strtoull (arg, &err_str, 10);
if (err_str && *err_str != 0) {
- msg_info ("bad arguments to sync commanc: %s", arg);
+ msg_info ("bad arguments to sync command: %s", arg);
return FALSE;
}
arg = *(args + 2);
@@ -273,7 +273,7 @@ process_sync_command (struct controller_session *session, char **args)
}
time = strtoull (arg, &err_str, 10);
if (err_str && *err_str != 0) {
- msg_info ("bad arguments to sync commanc: %s", arg);
+ msg_info ("bad arguments to sync command: %s", arg);
return FALSE;
}
@@ -652,9 +652,11 @@ process_command (struct controller_command *cmd, char **cmd_args, struct control
" password <password> - authenticate yourself for privileged commands" CRLF
"(*) reload - reload rspamd" CRLF
"(*) shutdown - shutdown rspamd" CRLF
- " stat - show different rspamd stat" CRLF
+ " stat - show different rspamd stat" CRLF
+ " sync - run synchronization of statfiles" CRLF
" counters - show rspamd counters" CRLF
- " uptime - rspamd uptime" CRLF);
+ " uptime - rspamd uptime" CRLF
+ " weights <statfile> <size> - weight of message in all statfiles");
if (! rspamd_dispatcher_write (session->dispatcher, out_buf, r, FALSE, FALSE)) {
return FALSE;
}
@@ -790,7 +792,7 @@ controller_read_socket (f_str_t * in, void *arg)
c.len = part->content->len;
}
if (!session->learn_classifier->tokenizer->tokenize_func (session->learn_classifier->tokenizer, session->session_pool, &c, &tokens)) {
- i = rspamd_snprintf (out_buf, sizeof (out_buf), "learn fail, tokenizer error" CRLF);
+ i = rspamd_snprintf (out_buf, sizeof (out_buf), "learn failed, tokenizer error" CRLF);
free_task (task, FALSE);
if (!rspamd_dispatcher_write (session->dispatcher, out_buf, i, FALSE, FALSE)) {
return FALSE;
@@ -803,7 +805,7 @@ controller_read_socket (f_str_t * in, void *arg)
/* Handle messages without text */
if (tokens == NULL) {
- i = rspamd_snprintf (out_buf, sizeof (out_buf), "learn fail, no tokens can be extracted (no text data)" CRLF);
+ i = rspamd_snprintf (out_buf, sizeof (out_buf), "learn failed, no tokens can be extracted (no text data)" CRLF);
free_task (task, FALSE);
if (!rspamd_dispatcher_write (session->dispatcher, out_buf, i, FALSE, FALSE)) {
return FALSE;
@@ -877,7 +879,7 @@ controller_read_socket (f_str_t * in, void *arg)
c.begin = part->content->data;
c.len = part->content->len;
if (!session->learn_classifier->tokenizer->tokenize_func (session->learn_classifier->tokenizer, session->session_pool, &c, &tokens)) {
- i = rspamd_snprintf (out_buf, sizeof (out_buf), "weights fail, tokenizer error" CRLF);
+ i = rspamd_snprintf (out_buf, sizeof (out_buf), "weights failed, tokenizer error" CRLF);
free_task (task, FALSE);
if (!rspamd_dispatcher_write (session->dispatcher, out_buf, i, FALSE, FALSE)) {
return FALSE;
@@ -890,7 +892,7 @@ controller_read_socket (f_str_t * in, void *arg)
/* Handle messages without text */
if (tokens == NULL) {
- i = rspamd_snprintf (out_buf, sizeof (out_buf), "weights fail, no tokens can be extracted (no text data)" CRLF);
+ i = rspamd_snprintf (out_buf, sizeof (out_buf), "weights failed, no tokens can be extracted (no text data)" CRLF);
free_task (task, FALSE);
if (!rspamd_dispatcher_write (session->dispatcher, out_buf, i, FALSE, FALSE)) {
return FALSE;