]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
* htonl->htons as port is uint16_t, so lower bytes are zeroed or undefined when call...
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Mon, 2 Mar 2009 13:54:03 +0000 (16:54 +0300)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Mon, 2 Mar 2009 13:54:03 +0000 (16:54 +0300)
rspamd.conf.sample
src/plugins/surbl.c

index 8fd0315f45368d4c3b219d4e48998860ceb36761..591f8876c3f88d1ea27f0e2ca59d5dbbc923f961 100644 (file)
@@ -102,7 +102,7 @@ delivery {
 # SURBL module params, note that single quotes are mandatory here
 .module 'surbl' {
        # Address to redirector in host:port format
-       #redirector = "localhost:8080";
+       redirector = "localhost:8080";
        # Connect timeout for redirector
        redirector_connect_timeout = "1s";
        # IO timeout for redirector (may be usefull to set this value rather big)
index d563e9cde15f6c2b0f6fb47b057b76887bc8273c..cd8c4e3aaa4fd5d68bc5bf49caffbd1149f868a0 100644 (file)
@@ -549,7 +549,7 @@ register_redirector_call (struct uri *url, struct worker_task *task)
 
        bzero (&sc, sizeof (struct sockaddr_in *));
        sc.sin_family = AF_INET;
-       sc.sin_port = htonl (surbl_module_ctx->redirector_port);
+       sc.sin_port = htons (surbl_module_ctx->redirector_port);
        memcpy (&sc.sin_addr, &surbl_module_ctx->redirector_addr, sizeof (struct in_addr));
 
        s = socket (PF_INET, SOCK_STREAM, 0);
@@ -560,8 +560,8 @@ register_redirector_call (struct uri *url, struct worker_task *task)
        }
 
        /* set nonblocking */
-    ofl = fcntl(s, F_GETFL, 0);
-    fcntl(s, F_SETFL, ofl | O_NONBLOCK);
+    ofl = fcntl (s, F_GETFL, 0);
+    fcntl (s, F_SETFL, ofl | O_NONBLOCK);
        
        if ((r = connect (s, (struct sockaddr*)&sc, sizeof (struct sockaddr_in))) == -1) {
                if (errno != EINPROGRESS) {