r138@llin (orig r137): dpavlin | 2007-10-26 23:25:08 +0200
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 27 Oct 2007 22:53:58 +0000 (22:53 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 27 Oct 2007 22:53:58 +0000 (22:53 +0000)
 everything uses yaml for now

git-svn-id: https://perl-cwmp.googlecode.com/svn/trunk@153 836a5e1a-633d-0410-964b-294494ad4392

Makefile.PL
lib/CWMP/Response.pm
lib/CWMP/Server.pm

index 2901ef7..1567770 100644 (file)
@@ -28,4 +28,3 @@ clean_files('dump/* yaml state.db');
 auto_install;
 
 WriteAll;
-
index 6b2a866..10303b2 100644 (file)
@@ -101,6 +101,27 @@ sub GetParameterNames {
        });
 }
 
+=head2 GetParameterValues {
+
+  $response->GetParameterValues( $state, $ParameterPath, $NextLevel );
+
+=cut
+
+sub GetParameterValues {
+       my ( $self, $state, $ParameterPath, $NextLevel ) = @_;
+       $ParameterPath ||= '';  # all
+       $NextLevel ||= 0;               # all
+       warn "# GetParameterValues( '$ParameterPath', $NextLevel )\n" if $self->debug;
+       $self->xml( $state, sub {
+               my ( $X, $state ) = @_;
+
+               $X->GetParameterValues( $cwmp,
+                       $X->ParameterPath( $cwmp, $ParameterPath ),
+                       $X->NextLevel( $cwmp, $NextLevel ),
+               );
+       });
+}
+
 =head2 xml
 
 Used to implement methods which modify just body of soap message.
index 381e255..7634806 100644 (file)
@@ -137,15 +137,21 @@ sub process_request {
 
        warn "default CPE queue ( " . join(",",@{$prop->{default_queue}}) . " )\n" if defined($prop->{default_queue});
 
-       my $session = CWMP::Session->new({
-               sock => $sock,
-               queue => $prop->{default_queue},
-               store => $prop->{store},
-               debug => $prop->{debug},
-       }) || confess "can't create session";
-
-       while ( $session->process_request ) {
-               warn "...another one bites the dust...\n";
+       eval  {
+               my $session = CWMP::Session->new({
+                       sock => $sock,
+                       queue => $prop->{default_queue},
+                       store => $prop->{store},
+                       debug => $prop->{debug},
+               }) || confess "can't create session";
+
+               while ( $session->process_request ) {
+                       warn "...another one bites the dust...\n";
+               }
+       };
+
+       if ($@) {
+               warn $@;
        }
 
        warn "...returning to accepting new connections\n";