From c7730e2d4e7b2ab1985fc368c8d2728700a164f0 Mon Sep 17 00:00:00 2001 From: ben Date: Sat, 25 Aug 2012 13:54:56 +0000 Subject: [PATCH] Fix matching of channel and global requests with replies in logparse.pl. In each case, want_reply was being treated as true even when it wasn't, because it got decoded into "yes"/"no", both of which are true in Perl. git-svn-id: svn://svn.tartarus.org/sgt/putty@9617 cda61777-01e9-0310-a592-d414129be87e --- contrib/logparse.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/logparse.pl b/contrib/logparse.pl index 5851a876..1790f2e0 100755 --- a/contrib/logparse.pl +++ b/contrib/logparse.pl @@ -172,7 +172,7 @@ my %packets = ( my ($type, $wantreply) = &parse("sb", $data); printf "%s (%s)", $type, $wantreply eq "yes" ? "reply" : "noreply"; my $request = [$seq, $type]; - push @{$globalreq{$direction}}, $request if $wantreply; + push @{$globalreq{$direction}}, $request if $wantreply eq "yes"; if ($type eq "tcpip-forward" or $type eq "cancel-tcpip-forward") { my ($addr, $port) = &parse("su", $data); printf " %s:%s", $addr, $port; @@ -361,7 +361,8 @@ my %packets = ( my $chan = $channels[$index]; printf "ch%d (%s) %s (%s)", $index, $chan->{'id'}, $type, $wantreply eq "yes" ? "reply" : "noreply"; - push @{$chan->{'requests_'.$direction}}, [$seq, $type] if $wantreply; + push @{$chan->{'requests_'.$direction}}, [$seq, $type] + if $wantreply eq "yes"; if ($type eq "pty-req") { my ($term, $w, $h, $pw, $ph, $modes) = &parse("suuuus", $data); printf " %s %sx%s", &str($term), $w, $h; -- 2.11.0