From 5466e6a4b964a23fcae743c5af6429f5881b3f37 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Fri, 26 Oct 2007 16:52:24 +0000 Subject: [PATCH] include IP address in dump/ filenames git-svn-id: https://perl-cwmp.googlecode.com/svn/trunk@126 836a5e1a-633d-0410-964b-294494ad4392 --- lib/CWMP/Session.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CWMP/Session.pm b/lib/CWMP/Session.pm index 8efc4e4..41e99d1 100644 --- a/lib/CWMP/Session.pm +++ b/lib/CWMP/Session.pm @@ -102,7 +102,7 @@ sub process_request { warn "<<<< ", $sock->peerhost, " [" . localtime() . "] ", $r->method, " ", $r->uri, " $size bytes\n"; if ( $self->debug > 2 ) { - my $file = sprintf("dump/%04d.request", $dump_nr++); + my $file = sprintf("dump/%04d-%s.request", $dump_nr++, $sock->peerhost); write_file( $file, $r->as_string ); warn "### request dump: $file\n"; } @@ -184,7 +184,7 @@ sub dispatch { my $xml = $response->$dispatch( $self->state, @_ ); warn "## response payload: ",length($xml)," bytes\n$xml\n" if $self->debug; if ( $self->debug > 2 ) { - my $file = sprintf("dump/%04d.response", $dump_nr++); + my $file = sprintf("dump/%04d-%s.response", $dump_nr++, $self->sock->peerhost); write_file( $file, $xml ); warn "### response dump: $file\n"; } -- 2.20.1