/[cwmp]/google/trunk/lib/CWMP/Store.pm
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/trunk/lib/CWMP/Store.pm

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

revision 79 by dpavlin, Fri Jun 22 14:32:13 2007 UTC revision 81 by dpavlin, Fri Jun 22 14:59:40 2007 UTC
# Line 63  sub update_state { Line 63  sub update_state {
63          confess "need ID" unless $ID;          confess "need ID" unless $ID;
64          confess "need state" unless $state;          confess "need state" unless $state;
65    
         warn "## update state of $ID\n" if $self->debug;  
66    
67          $self->db->import( $ID => $state );          if ( my $o = $self->db->get( $ID ) ) {
68                    warn "## update state of $ID\n" if $self->debug;
69                    $o->import( $state );
70            } else {
71                    warn "## create new state for $ID\n" if $self->debug;
72                    $self->db->put( $ID => $state );
73            }
74            
75  }  }
76  1;  1;

Legend:
Removed from v.79  
changed lines
  Added in v.81

  ViewVC Help
Powered by ViewVC 1.1.26