MT#10493 tt2-daemon: give the client a copy of the config

This will avoid changes on the config inside one template to be spread to the rest

Change-Id: I7d000914d3c95d0fa8e1daa185e24ec1bd7fcd68
changes/03/603/1
Victor Seva 11 years ago
parent a7f8cd1617
commit 73393c3cf5

2
debian/control vendored

@ -5,6 +5,7 @@ Maintainer: Sipwise Development Team <support@sipwise.com>
Build-Depends: asciidoc,
debhelper (>= 9~),
docbook-xsl,
libclone-perl,
libdata-validate-ip-perl,
libdbd-mysql-perl,
libdbi-perl,
@ -29,6 +30,7 @@ Architecture: all
Depends: etckeeper,
file,
git (>= 1:1.7.2.5-3~),
libclone-perl,
libdata-validate-ip-perl,
libdbd-mysql-perl,
libdbi-perl,

@ -7,6 +7,7 @@ use IO::Socket;
use Hash::Merge qw(merge);
use Template;
use YAML qw/LoadFile/;
use Clone 'clone';
my $server_port = get_server_port();
@ -66,7 +67,7 @@ sub handle_connections {
};
open my $fh, '<', $template or print $client "Unable to open file '$template' for reading: $!\n";
$tt->process($fh, $config, $client) or print $client $tt->error;
$tt->process($fh, clone($config), $client) or print $client $tt->error;
close $fh;
close $client;

Loading…
Cancel
Save