From: Francesco Chemolli Date: Mon, 14 Apr 2014 13:50:27 +0000 (+0200) Subject: Made storeid_file_rewrite support concurrency protocol X-Git-Tag: SQUID_3_5_0_1~290 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a6fcc71ec6ff3134e7e3e1b5b9482a16096ed08;p=thirdparty%2Fsquid.git Made storeid_file_rewrite support concurrency protocol --- diff --git a/helpers/storeid_rewrite/file/storeid_file_rewrite.pl.in b/helpers/storeid_rewrite/file/storeid_file_rewrite.pl.in index 342858cd17..c0d38565a9 100644 --- a/helpers/storeid_rewrite/file/storeid_file_rewrite.pl.in +++ b/helpers/storeid_rewrite/file/storeid_file_rewrite.pl.in @@ -53,7 +53,12 @@ close RULES; URL: while () { chomp; last if $_ eq 'quit'; - + + my $channel = ""; + if (s/^(\d+\s+)//o) { + $channel = $1; + } + foreach my $rule (@rules) { if (my @match = /$rule->[0]/) { $_ = $rule->[1]; @@ -61,11 +66,11 @@ URL: while () { for (my $i=1; $i<=scalar(@match); $i++) { s/\$$i/$match[$i-1]/g; } - print "OK store-id=$_\n"; + print $channel, "OK store-id=$_\n"; next URL; } } - print "ERR\n"; + print $channel, "ERR\n"; } =pod