------------------------------------------------------------ revno: 13355 revision-id: kinkie@squid-cache.org-20140414135027-oa4n03luzbvt2hcr parent: squid3@treenet.co.nz-20140414065722-tfmhj7oruvv4mi9u committer: Francesco Chemolli branch nick: trunk timestamp: Mon 2014-04-14 15:50:27 +0200 message: Made storeid_file_rewrite support concurrency protocol ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: kinkie@squid-cache.org-20140414135027-oa4n03luzbvt2hcr # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: a5cb9b5201ac557535d7649419e251df53fe75db # timestamp: 2014-04-14 13:53:53 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: squid3@treenet.co.nz-20140414065722-\ # tfmhj7oruvv4mi9u # # Begin patch === modified file 'helpers/storeid_rewrite/file/storeid_file_rewrite.pl.in' --- helpers/storeid_rewrite/file/storeid_file_rewrite.pl.in 2013-07-09 11:15:51 +0000 +++ helpers/storeid_rewrite/file/storeid_file_rewrite.pl.in 2014-04-14 13:50:27 +0000 @@ -53,7 +53,12 @@ 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 @@ 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