Skip to content
Snippets Groups Projects
Commit 970a02e2 authored by rswindell's avatar rswindell
Browse files

Add optional debug log of received spamd header.

Bug-fix: score and threshold are floats.
parent d1bc0f32
No related branches found
No related tags found
No related merge requests found
...@@ -46,6 +46,8 @@ function Message_DoCommand(command) ...@@ -46,6 +46,8 @@ function Message_DoCommand(command)
sock.is_writeable=false; sock.is_writeable=false;
while(1) { while(1) {
tmp=sock.recvline(); tmp=sock.recvline();
if(this.debug)
log(LOG_DEBUG,"RX SPAMD header: " + tmp);
if(tmp==undefined || tmp=='') if(tmp==undefined || tmp=='')
break; break;
rcvd.push(tmp); rcvd.push(tmp);
...@@ -84,9 +86,9 @@ function Message_DoCommand(command) ...@@ -84,9 +86,9 @@ function Message_DoCommand(command)
else else
ret.isSpam=false; ret.isSpam=false;
if(tmp[2] == ';') { if(tmp[2] == ';') {
ret.score=parseInt(tmp[3]); ret.score=parseFloat(tmp[3]);
if(tmp[4] == '/') if(tmp[4] == '/')
ret.threshold=parseInt(tmp[5]); ret.threshold=parseFloat(tmp[5]);
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment