aboutsummaryrefslogtreecommitdiffstats
path: root/src/worker.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-03-10 19:54:20 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-03-10 19:54:20 +0300
commite7017a518bbec3f2de37275ac6195ea55cb6b19e (patch)
tree084f1c81a1d0606e575abd2156e5c4314615652c /src/worker.c
parent9cfc5813c0a07ddce2bd0c611a9de84f67a4a910 (diff)
downloadrspamd-e7017a518bbec3f2de37275ac6195ea55cb6b19e.tar.gz
rspamd-e7017a518bbec3f2de37275ac6195ea55cb6b19e.zip
* Fix redirector connection procedure
* Add more strict login * Add new header Queue-ID to protocol * Log message id or queue id * Add config file for redirector * Add ability to set regexp and domains list to check with redirector
Diffstat (limited to 'src/worker.c')
-rw-r--r--src/worker.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/worker.c b/src/worker.c
index 6c3b245c5..ee10d9a84 100644
--- a/src/worker.c
+++ b/src/worker.c
@@ -220,6 +220,7 @@ accept_socket (int fd, short what, void *arg)
{
struct rspamd_worker *worker = (struct rspamd_worker *)arg;
struct sockaddr_storage ss;
+ struct sockaddr_in *sin;
struct worker_task *new_task;
socklen_t addrlen = sizeof(ss);
int nfd;
@@ -228,6 +229,14 @@ accept_socket (int fd, short what, void *arg)
msg_warn ("accept_socket: accept failed: %s", strerror (errno));
return;
}
+
+ if (ss.ss_family == AF_UNIX) {
+ msg_info ("accept_socket: accepted connection from unix socket");
+ }
+ else if (ss.ss_family == AF_INET) {
+ sin = (struct sockaddr_in *) &ss;
+ msg_info ("accept_socket: accepted connection from %s port %d", inet_ntoa (sin->sin_addr), ntohs (sin->sin_port));
+ }
new_task = g_malloc (sizeof (struct worker_task));