aboutsummaryrefslogtreecommitdiffstats
path: root/rspamc.pl.in
diff options
context:
space:
mode:
authorcebka@lenovo-laptop <cebka@lenovo-laptop>2010-03-01 18:54:56 +0300
committercebka@lenovo-laptop <cebka@lenovo-laptop>2010-03-01 18:54:56 +0300
commit7ea00c31332d289842f5b8e3f73ea64cda3968d9 (patch)
tree4e37c35678586412721601c36cfa786c458663b8 /rspamc.pl.in
parent74cf00015278784d04d26b44bcf326f9493f7d62 (diff)
downloadrspamd-7ea00c31332d289842f5b8e3f73ea64cda3968d9.tar.gz
rspamd-7ea00c31332d289842f5b8e3f73ea64cda3968d9.zip
* Fix bugs from previous commit
Diffstat (limited to 'rspamc.pl.in')
-rwxr-xr-xrspamc.pl.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/rspamc.pl.in b/rspamc.pl.in
index 19bcab3f7..d53084509 100755
--- a/rspamc.pl.in
+++ b/rspamc.pl.in
@@ -234,7 +234,8 @@ sub do_control_command {
print "Sending $len bytes...\n";
syswrite $sock, "weights $cfg{'statfile'} $len" . $CRLF;
syswrite $sock, $input . $CRLF;
- if (defined (my $reply = <$sock>)) {
+ while (defined (my $reply = <$sock>)) {
+ last if $line =~ /^END/;
print $_;
}
}
@@ -544,7 +545,7 @@ if ($cmd =~ /(SYMBOLS|SCAN|PROCESS|CHECK|REPORT_IFSPAM|REPORT|URLS|EMAILS)/i) {
$cfg{'command'} = $1;
$cfg{'control'} = 0;
}
-elsif ($cmd =~ /(STAT|LEARN|SHUTDOWN|RELOAD|UPTIME|COUNTERS|FUZZY_ADD|FUZZY_DEL)/i) {
+elsif ($cmd =~ /(STAT|LEARN|SHUTDOWN|RELOAD|UPTIME|COUNTERS|FUZZY_ADD|FUZZY_DEL|WEIGHTS)/i) {
$cfg{'command'} = $1;
$cfg{'control'} = 1;
}