/[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 168 by dpavlin, Sat Oct 27 22:55:45 2007 UTC revision 169 by dpavlin, Sun Oct 28 13:01:03 2007 UTC
# Line 63  sub current_store { Line 63  sub current_store {
63    
64          confess "unknown store module $module not one of ", dump( $self->possible_stores ) unless $s;          confess "unknown store module $module not one of ", dump( $self->possible_stores ) unless $s;
65    
66          warn "## current store = $s\n" if $self->debug;          warn "#### current store = $s\n" if $self->debug > 4;
67    
68          return $s;          return $s;
69  }  }
# Line 84  sub update_state { Line 84  sub update_state {
84          confess "need $k value" unless $v;          confess "need $k value" unless $v;
85          confess "need state" unless $state;          confess "need state" unless $state;
86    
87          warn "## update_state( $k => $v, ", dump( $state ), " )\n" if $self->debug;          warn "#### update_state( $k => $v, ", dump( $state ), " )\n" if $self->debug > 4;
88    
89          my $uid;          my $uid;
90    
# Line 117  sub get_state { Line 117  sub get_state {
117          confess "need ID or uid" unless $k =~ m/^(ID|uid)$/;          confess "need ID or uid" unless $k =~ m/^(ID|uid)$/;
118          confess "need $k value" unless $v;          confess "need $k value" unless $v;
119    
120          warn "## get_state( $k => $v )\n" if $self->debug;          warn "#### get_state( $k => $v )\n" if $self->debug > 4;
121    
122          my $uid;          my $uid;
123    
# Line 166  sub ID_to_uid { Line 166  sub ID_to_uid {
166    
167          confess "need ID" unless $ID;          confess "need ID" unless $ID;
168    
169          warn "ID_to_uid",dump( $ID, $state ),$/ if $self->debug;          warn "#### ID_to_uid",dump( $ID, $state ),$/ if $self->debug > 4;
170    
171          $session->{ $ID }->{last_seen} = time();          $session->{ $ID }->{last_seen} = time();
172    
# Line 183  sub ID_to_uid { Line 183  sub ID_to_uid {
183                  return $uid;                  return $uid;
184          } else {          } else {
185                  warn "## can't find uid for ID $ID, first seen?\n";                  warn "## can't find uid for ID $ID, first seen?\n";
                 return;  
186          }          }
187    
188          # TODO: expire sessions longer than 30m          # TODO: expire sessions longer than 30m
189    
         warn "current session = ",dump( $session );  
   
190          return;          return;
191  }  }
192    

Legend:
Removed from v.168  
changed lines
  Added in v.169

  ViewVC Help
Powered by ViewVC 1.1.26