/[cwmp]/google/acs.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /google/acs.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2 by dpavlin, Sat May 19 15:15:14 2007 UTC revision 11 by dpavlin, Sat May 19 20:46:42 2007 UTC
# Line 3  Line 3 
3  use warnings;  use warnings;
4  use strict;  use strict;
5    
6    use lib 'lib';
7  use SOAP::Transport::HTTP +trace => 'debug';  use SOAP::Transport::HTTP +trace => 'debug';
8    
9  # Eh...  # Eh...
# Line 29  package CWMP; Line 30  package CWMP;
30  use strict;  use strict;
31    
32  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
33    use Carp qw/cluck/;
34    
35  sub new {  sub new {
36          bless {}, shift;          bless {}, shift;
# Line 42  sub new { Line 44  sub new {
44  # Kicked           Optional   Optional  # Kicked           Optional   Optional
45    
46  sub Inform {  sub Inform {
47          my ($self, $DeviceId, $Event, $MaxEnvelopes, $CurrentTime, $RetryCount, $ParameterList) = @_;          my ($self, $DeviceId, $Event, $MaxEnvelopes, $CurrentTime, $RetryCount, $ParameterList, $headers) = @_;
48    
49          my $p;          my $p;
50    
51            #cluck dump( $daemon );
52            #warn dump( $headers );
53    
54            my $ID = ( grep { $_->name eq 'ID' } @$headers )[0]->value;
55    
56          foreach ( @$ParameterList ) {          foreach ( @$ParameterList ) {
57                  $p->{ $_->{Name} } = $_->{Value};                  $p->{ $_->{Name} } = $_->{Value};
58          }          }
59    
60          warn "request from ", dump( $DeviceId ), " with events ",dump( $Event ), "maxEnvelopes: $MaxEnvelopes on $CurrentTime retry $RetryCount params ", dump( $p );          warn "request $ID from ", dump( $DeviceId ), " with events ",dump( $Event ), "maxEnvelopes: $MaxEnvelopes on $CurrentTime retry $RetryCount params ", dump( $p );
61    
62            return SOAP::Data->name('MaxEnvelopes' => $MaxEnvelopes);
63  }  }

Legend:
Removed from v.2  
changed lines
  Added in v.11

  ViewVC Help
Powered by ViewVC 1.1.26