From 5e3f82cf4b7a4788fc9e0a78782ad05988c4502c Mon Sep 17 00:00:00 2001 From: tzafrir Date: Thu, 12 Jul 2007 22:49:13 +0000 Subject: xpp driver r4371: * Update to zaptel-1.2.18 and zaptel-1.4.3 (r4308 onward) * Fix a critical race with zaptel synchronization (r4362) * Added a /proc/xpp/cmds for statistics about command timing (r4360) * Fix a digit mapping bug with hardware dtmf detection (r4357) * In xpp/utils/Makefile add perl syntax checks to our scripts (r4337) * Better USB data error checking (r4336) * udev rules (xpp.rules) avoid false calls from wrong nodes (r4331) * Improve hardware detection and reporting in lszaptel, zaptel_hardware. zapconf is basically functional. * Leds are blinked synchronously on all Astribanks now (r4262) * Fix a BRI bug if OPTIMIZE_CHANMUTE was compiled into zaptel (r4258) (This feature was not yet accepted into official zaptel) * Removed compile warning about HZ != 1000 (r4218) * Firmware updates. * fpga_load now supports USB pathes without zeros (r4211) * XPD numbers have changed to '' (r4196) * Proper support for ZT_VMWI ioctl, if used in zaptel (r4092) * Fix FXO power denial detection (r4054) * FXO could accidentally go off-hook with some compilers (r4048) git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@2732 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- xpp/utils/zconf/Zaptel/Config/Defaults.pm | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 xpp/utils/zconf/Zaptel/Config/Defaults.pm (limited to 'xpp/utils/zconf/Zaptel/Config') diff --git a/xpp/utils/zconf/Zaptel/Config/Defaults.pm b/xpp/utils/zconf/Zaptel/Config/Defaults.pm new file mode 100644 index 0000000..90b49ab --- /dev/null +++ b/xpp/utils/zconf/Zaptel/Config/Defaults.pm @@ -0,0 +1,29 @@ +package Zaptel::Config::Defaults; +# +# Written by Oron Peled +# Copyright (C) 2007, Xorcom +# This program is free software; you can redistribute and/or +# modify it under the same terms as Perl itself. +# +# $Id$ +# +use strict; + +# Use the shell to source a file and expand a given list +# of variables. +sub do_source($@) { + my $file = shift; + my @vars = @_; + my @output = `env -i sh -ec '. $file; export @vars; env'`; + die "$0: Sourcing '$file' exited with $?" if $?; + my %vars; + + foreach my $line (@output) { + chomp $line; + my ($k, $v) = split(/=/, $line, 2); + $vars{$k} = $v if grep /^$k$/, @vars; + } + return %vars; +} + +1; -- cgit v1.2.3