warn "<<<< ", $sock->peerhost, " [" . localtime() . "] ", $r->method, " ", $r->uri, " $size bytes\n";
+ $dump_nr++;
+ my $file = sprintf("dump/%04d-%s.request", $dump_nr, $sock->peerhost);
+
if ( $self->debug > 2 ) {
- my $file = sprintf("dump/%04d-%s.request", $dump_nr++, $sock->peerhost);
write_file( $file, $r->as_string );
warn "### request dumped to file: $file\n";
}
$state = CWMP::Request->parse( $xml );
+ if ( defined( $state->{_dispatch} ) && $self->debug > 2 ) {
+ my $type = sprintf("dump/%04d-%s-%s", $dump_nr, $sock->peerhost, $state->{_dispatch});
+ symlink $file, $type || warn "can't symlink $file -> $type: $!";
+ }
+
warn "## acquired state = ", dump( $state ), "\n";
$self->state( $state );