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

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

revision 55 by dpavlin, Wed Jun 20 20:49:53 2007 UTC revision 70 by dpavlin, Wed Jun 20 23:34:33 2007 UTC
# Line 120  sub process_request { Line 120  sub process_request {
120    
121                  do {                  do {
122    
123                          warn "get chunk len\n" if $self->debug;                          warn "get chunk len\n" if $self->debug > 1;
124                                                    
125                          my $hex;                          my $hex;
126                          do {                          do {
# Line 131  sub process_request { Line 131  sub process_request {
131                          die "chunk size not valid hex: $hex" unless ( $hex =~ m/^[0-9a-f]+$/i);                          die "chunk size not valid hex: $hex" unless ( $hex =~ m/^[0-9a-f]+$/i);
132                          $len = hex( $hex );                          $len = hex( $hex );
133    
134                          warn "getting chunk of $len bytes\n" if $self->debug;                          warn "getting chunk of $len bytes\n" if $self->debug > 1;
135    
136                          $sock->read( my $buff, $len );                          $sock->read( my $buff, $len );
137                          $chunk .= $buff;                          $chunk .= $buff;
138    
139                          warn "--- $len bytes: --=>||$buff||<=--\n" if $self->debug;                          warn "--- $len bytes: --=>||$buff||<=--\n" if $self->debug > 1;
140    
141                  } while ( $len > 0 );                  } while ( $len > 0 );
142                  my $sep = $sock->getline;                  my $sep = $sock->getline;
# Line 162  sub process_request { Line 162  sub process_request {
162    
163                          $state = CWMP::Request->parse( $chunk );                          $state = CWMP::Request->parse( $chunk );
164    
165                          warn "acquired state = ", dump( $state ), "\n";                          warn "## acquired state = ", dump( $state ), "\n";
166    
167                          $self->state( $state );                          $self->state( $state );
168    
169                  } else {                  } else {
170                          warn "empty request\n";                          warn "## empty request\n";
171                  }                  }
172    
173          } else {          } else {
174                  $state = $self->state;                  $state = $self->state;
175                  warn "last request state = ", dump( $state ), "\n";                  warn "last request state = ", dump( $state ), "\n" if $self->debug > 1;
176          }          }
177    
178    
# Line 203  sub process_request { Line 203  sub process_request {
203          $sock->send( "Content-Length: " . length( $xml ) . "\r\n\r\n" );          $sock->send( "Content-Length: " . length( $xml ) . "\r\n\r\n" );
204          $sock->send( $xml ) or die "can't send response";          $sock->send( $xml ) or die "can't send response";
205    
206          warn "### request over";          warn "### request over\n" if $self->debug;
207    
208  };  };
209    

Legend:
Removed from v.55  
changed lines
  Added in v.70

  ViewVC Help
Powered by ViewVC 1.1.26