From 28afbbbb1753473ed1cf3bd073ff5aae5bbeadfe Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Sun, 8 Feb 2009 11:04:00 +0000 Subject: dahdi_genconf: do reset default files list when command-line has files This fixes a regression that was added whwn handling of R2 was added. Originally: Xorcom rev 6683. git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@5984 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- xpp/dahdi_genconf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xpp/dahdi_genconf b/xpp/dahdi_genconf index a0e4e20..0b2b321 100755 --- a/xpp/dahdi_genconf +++ b/xpp/dahdi_genconf @@ -749,7 +749,13 @@ sub set_defaults { } sub parse_args { - push(@ARGV, 'unicall') if $pri_connection_type eq 'R2'; + if (not @ARGV) { + # No files given. Use the defaults. + push(@ARGV, 'unicall') if $pri_connection_type eq 'R2'; + return; + } + + @default_files = (); for my $file (@ARGV) { die "$0: Unknown file '$file'" unless defined $files{$file}; push @default_files, $file; -- cgit v1.2.3