summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-02-08 11:04:00 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-02-08 11:04:00 +0000
commit28afbbbb1753473ed1cf3bd073ff5aae5bbeadfe (patch)
tree4b7c56d0577632156bfcad0f92e8563b1d8de729
parent763ff6055c20d2879567661e0886d522660059f3 (diff)
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
-rwxr-xr-xxpp/dahdi_genconf8
1 files changed, 7 insertions, 1 deletions
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;