]> source.dussan.org Git - rspamd.git/commitdiff
Write client's host when network error is occured
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Fri, 24 Dec 2010 16:32:27 +0000 (19:32 +0300)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Fri, 24 Dec 2010 16:32:27 +0000 (19:32 +0300)
Write domain name for redirectors call

src/plugins/surbl.c
src/worker.c

index 840710b3929d1b58d5b2ebb4abcdf0c23bb5972b..850c5376656ae9cfb0092c721cf4149a31952ed2 100644 (file)
@@ -886,7 +886,8 @@ redirector_callback (gint fd, short what, void *arg)
 
 
 static void
-register_redirector_call (struct uri *url, struct worker_task *task, GTree * url_tree, struct suffix_item *suffix)
+register_redirector_call (struct uri *url, struct worker_task *task, GTree * url_tree,
+               struct suffix_item *suffix, const gchar *rule)
 {
        gint                            s = -1;
        struct redirector_param        *param;
@@ -925,7 +926,8 @@ register_redirector_call (struct uri *url, struct worker_task *task, GTree * url
        event_add (&param->ev, timeout);
        register_async_event (task->s, free_redirector_session, param, FALSE);
 
-       msg_info ("<%s> registered redirector call for %s to %s", task->message_id, struri (url), selected->name);
+       msg_info ("<%s> registered redirector call for %s to %s, according to rule: %s",
+                       task->message_id, struri (url), selected->name, rule);
 }
 
 static                          gboolean
@@ -958,7 +960,7 @@ surbl_tree_url_callback (gpointer key, gpointer value, void *data)
                        re = g_hash_table_lookup (surbl_module_ctx->redirector_hosts, red_domain);
                        if (re != NULL && (re == NO_REGEXP || g_regex_match (re, url->string, 0, NULL))) {
                                /* If no regexp found or founded regexp matches url string register redirector's call */
-                               register_redirector_call (url, param->task, param->tree, param->suffix);
+                               register_redirector_call (url, param->task, param->tree, param->suffix, red_domain);
                                param->task->save.saved++;
                                return FALSE;
                        }
index 39cf8fb81e40b083bd28da9f70998304ee29e8e2..160aa6969b4074e32ea1bf163d467388478514b1 100644 (file)
@@ -446,7 +446,8 @@ err_socket (GError * err, void *arg)
        struct rspamd_worker_ctx       *ctx;
 
        ctx = task->worker->ctx;
-       msg_info ("abnormally closing connection, error: %s", err->message);
+
+       msg_info ("abnormally closing connection from: %s, error: %s", inet_ntoa (task->client_addr), err->message);
        /* Free buffers */
        if (ctx->is_custom) {
                fin_custom_filters (task);