diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-04-29 22:44:32 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-04-29 22:44:32 +0000 |
commit | 21263d58b5659eb42d200a38b17da18fce49a881 (patch) | |
tree | 205cbb81e5906362c4be4eb11800f028694c620f /xpp/utils/zconf/Zaptel/Xpp/Xpd.pm | |
parent | 2c5d383ce7ad82476fe1687b9d29aad87a80e6ee (diff) |
xpp rev. 3814:
* Protocol no. 2.6: syncing improvements.
* Support for 8-port Astribank BRI.
* Firmware unloading now works:
rmmod xpp_usb; /etc/hotplug/usb/xpp_fxloader reset
* Defaults of kernel parameters are now part of parameter description.
* World-readable kernel parameters.
* No need for extra patch beyond bristuff for Astribank BRI.
* Default poll intervals changed: 500 in BRI and FXO.
* Allow changing FXS polls interval at run time.
* BRI initalization fixed on SUSE (path to logger).
* When using the SUSE zaptel rpm package, set modules_var=ZAPTEL_MODULES in
/etc/sysconfig/zaptel .
* zt_registration not verbose by default.
* xpp_sync warns if FXO is sync slave.
* Fixed genzaptelconf -z (zapscan output emulation).
* PCM fixes.
* Solves "multiple ticks" bug. No need for pcm_tasklets workaround.
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2478 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/utils/zconf/Zaptel/Xpp/Xpd.pm')
-rw-r--r-- | xpp/utils/zconf/Zaptel/Xpp/Xpd.pm | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/xpp/utils/zconf/Zaptel/Xpp/Xpd.pm b/xpp/utils/zconf/Zaptel/Xpp/Xpd.pm index 180b7ea..94176b8 100644 --- a/xpp/utils/zconf/Zaptel/Xpp/Xpd.pm +++ b/xpp/utils/zconf/Zaptel/Xpp/Xpd.pm @@ -5,11 +5,14 @@ package Zaptel::Xpp::Xpd; # This program is free software; you can redistribute and/or # modify it under the same terms as Perl itself. # -#use strict; +# $Id$ +# +use strict; my $proc_base = "/proc/xpp"; # Accessors (miniperl does not have Class:Accessor) +our $AUTOLOAD; sub AUTOLOAD { my $self = shift; my $name = uc($AUTOLOAD); @@ -21,6 +24,32 @@ sub AUTOLOAD { } } +sub blink($$) { + my $self = shift; + my $on = shift; + my $result; + + my $file = "$proc_base/" . $self->fqn . "/blink"; + die "$file is missing" unless -f $file; + # First query + open(F, "$file") or die "Failed to open $file for reading: $!"; + $result = <F>; + chomp $result; + close F; + if(defined($on) and $on ne $result) { # Now change + open(F, ">$file") or die "Failed to open $file for writing: $!"; + print F ($on)?"1":"0"; + if(!close(F)) { + if($! == 17) { # EEXISTS + # good + } else { + undef $result; + } + } + } + return $result; +} + sub zt_registration($$) { my $self = shift; my $on = shift; |