parse_tcpdump_log.pl: Fix parsed output value
authorMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 9 Mar 2011 01:38:29 +0000 (22:38 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 9 Mar 2011 01:40:14 +0000 (22:40 -0300)
%02x were producing wrong values. Use %s instead.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
contrib/parse_tcpdump_log.pl

index ffb23f0..033e162 100755 (executable)
@@ -57,13 +57,13 @@ sub print_frame($$)
 
        my $app_data = substr($req{"Payload"}, 24 * 2);
        while ($app_data ne "") {
-               printf " %02x", substr($app_data, 0, 2);
+               printf " %s", substr($app_data, 0, 2);
                $app_data = substr($app_data, 2);
        }
 
        my $app_data = substr($resp{"Payload"}, 24 * 2);
        while ($app_data ne "") {
-               printf " %02x", substr($app_data, 0, 2);
+               printf " %s", substr($app_data, 0, 2);
                $app_data = substr($app_data, 2);
        }
 
@@ -229,4 +229,4 @@ sub parse_file($)
 }
 
 # Main program
-parse_file $filename;
\ No newline at end of file
+parse_file $filename;