From: Jason Stephenson Date: Tue, 23 Oct 2012 14:52:21 +0000 (-0400) Subject: LP#1070466: Print to STDERR in Sip/Checksum::debug_split_print. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=251821cb274cb5800f3aca03842da3250197b9d2;p=working%2FSIPServer.git LP#1070466: Print to STDERR in Sip/Checksum::debug_split_print. debug_split_print was printing to STDOUT, which goes to the client. This causes the client to hang up because it is not receiving the expected response from the server. Explicitly printing to STDERR in this function resolves this and you can continue your session while also debugging checksum calculations. Signed-off-by: Jason Stephenson Signed-off-by: Galen Charlton --- diff --git a/Sip/Checksum.pm b/Sip/Checksum.pm index 6d6a66b..389a0f8 100644 --- a/Sip/Checksum.pm +++ b/Sip/Checksum.pm @@ -54,11 +54,11 @@ sub debug_split_print { scalar(@row) and push @rows, \@row; foreach (@rows) { my $subtotal = 0; - print map {" $_ "} @$_; - printf "\n%-50s", join '', map {sprintf " %3d ", $_} map {$subtotal += ord($_); ord($_)} @$_; - printf "= %4d\n\n", $subtotal; + print STDERR map {" $_ "} @$_; + printf STDERR "\n%-50s", join '', map {sprintf " %3d ", $_} map {$subtotal += ord($_); ord($_)} @$_; + printf STDERR "= %4d\n\n", $subtotal; } - printf "%56d\n", $total; + printf STDERR "%56d\n", $total; return $total; }