From 970a02e257ba18b0592438a88c80e9e1f0b6fb37 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Fri, 9 Jan 2009 01:16:16 +0000 Subject: [PATCH] Add optional debug log of received spamd header. Bug-fix: score and threshold are floats. --- exec/load/salib.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/exec/load/salib.js b/exec/load/salib.js index 800d04cf50..4afe1b7c48 100644 --- a/exec/load/salib.js +++ b/exec/load/salib.js @@ -46,6 +46,8 @@ function Message_DoCommand(command) sock.is_writeable=false; while(1) { tmp=sock.recvline(); + if(this.debug) + log(LOG_DEBUG,"RX SPAMD header: " + tmp); if(tmp==undefined || tmp=='') break; rcvd.push(tmp); @@ -84,9 +86,9 @@ function Message_DoCommand(command) else ret.isSpam=false; if(tmp[2] == ';') { - ret.score=parseInt(tmp[3]); + ret.score=parseFloat(tmp[3]); if(tmp[4] == '/') - ret.threshold=parseInt(tmp[5]); + ret.threshold=parseFloat(tmp[5]); } } } -- GitLab