From bf8893ba35004a7f6649a90b5995b0eba457c66f Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Mon, 2 Mar 2009 20:43:25 +0000 Subject: dahdi_genconf: configuration handling cleanup. * Parsing genconf_parameters is now in Dahdi::Config::Params All hard-coded defaults are there too (in the item() method). * Dahdi::Config::Genconf is gone (merged into Dahdi::Config::Gen) All semantic mapping is in the constructor. * dahdi_genconf is now lean and mean. * Add some implementation docs into these files. git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@6075 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- xpp/perl_modules/Dahdi/Config/Gen/Chandahdi.pm | 2 +- xpp/perl_modules/Dahdi/Config/Gen/System.pm | 2 +- xpp/perl_modules/Dahdi/Config/Gen/Unicall.pm | 2 +- xpp/perl_modules/Dahdi/Config/Gen/Users.pm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'xpp/perl_modules/Dahdi/Config/Gen') diff --git a/xpp/perl_modules/Dahdi/Config/Gen/Chandahdi.pm b/xpp/perl_modules/Dahdi/Config/Gen/Chandahdi.pm index f48455d..1f39a7a 100644 --- a/xpp/perl_modules/Dahdi/Config/Gen/Chandahdi.pm +++ b/xpp/perl_modules/Dahdi/Config/Gen/Chandahdi.pm @@ -131,7 +131,7 @@ sub generate($) { my $file = $self->{FILE}; my $gconfig = $self->{GCONFIG}; my $genopts = $self->{GENOPTS}; - #Dahdi::Config::Gen::show_gconfig($gconfig); + #$gconfig->dump; my @spans = @_; warn "Empty configuration -- no spans\n" unless @spans; rename "$file", "$file.bak" diff --git a/xpp/perl_modules/Dahdi/Config/Gen/System.pm b/xpp/perl_modules/Dahdi/Config/Gen/System.pm index da60ec4..f805b65 100644 --- a/xpp/perl_modules/Dahdi/Config/Gen/System.pm +++ b/xpp/perl_modules/Dahdi/Config/Gen/System.pm @@ -107,7 +107,7 @@ sub generate($$$) { rename "$file", "$file.bak" or $! == 2 # ENOENT (No dependency on Errno.pm) or die "Failed to backup old config: $!\n"; - #Dahdi::Config::Gen::show_gconfig($gconfig); + #$gconfig->dump; print "Generating $file\n" if $genopts->{verbose}; open(F, ">$file") || die "$0: Failed to open $file: $!\n"; my $old = select F; diff --git a/xpp/perl_modules/Dahdi/Config/Gen/Unicall.pm b/xpp/perl_modules/Dahdi/Config/Gen/Unicall.pm index 526b62b..1a796f4 100644 --- a/xpp/perl_modules/Dahdi/Config/Gen/Unicall.pm +++ b/xpp/perl_modules/Dahdi/Config/Gen/Unicall.pm @@ -22,7 +22,7 @@ sub generate($) { my $file = $self->{FILE}; my $gconfig = $self->{GCONFIG}; my $genopts = $self->{GENOPTS}; - #Dahdi::Config::Gen::show_gconfig($gconfig); + #$gconfig->dump; my @spans = @_; warn "Empty configuration -- no spans\n" unless @spans; die "Only for R2" unless $gconfig->{'pri_connection_type'} eq 'R2'; diff --git a/xpp/perl_modules/Dahdi/Config/Gen/Users.pm b/xpp/perl_modules/Dahdi/Config/Gen/Users.pm index 36c2e65..e9d8ab9 100644 --- a/xpp/perl_modules/Dahdi/Config/Gen/Users.pm +++ b/xpp/perl_modules/Dahdi/Config/Gen/Users.pm @@ -73,7 +73,7 @@ sub generate($) { my $file = $self->{FILE}; my $gconfig = $self->{GCONFIG}; my $genopts = $self->{GENOPTS}; - #Dahdi::Config::Gen::show_gconfig($gconfig); + #$gconfig->dump; my @spans = @_; warn "Empty configuration -- no spans\n" unless @spans; rename "$file", "$file.bak" -- cgit v1.2.3