From 768a5d197c5d020c5d30fc219272524add02f2ac Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 17 Sep 2024 14:52:22 -0400 Subject: [PATCH] Bug 37582: Tidy write_msg Signed-off-by: Brendan Lawlor Signed-off-by: Kristi Krueger Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- C4/SIP/Sip.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/C4/SIP/Sip.pm b/C4/SIP/Sip.pm index cfaa202dac..667e0c83ac 100644 --- a/C4/SIP/Sip.pm +++ b/C4/SIP/Sip.pm @@ -187,9 +187,9 @@ sub boolspace { # sub write_msg { - my ($self, $msg, $server) = @_; + my ( $self, $msg, $server ) = @_; my $terminator = $server->{account}->{terminator}; - my $encoding = $server->{account}->{encoding}; + my $encoding = $server->{account}->{encoding}; $terminator ||= q{}; $terminator = ( $terminator eq 'CR' ) ? $CR : $CRLF; @@ -197,23 +197,23 @@ sub write_msg { my $separator = $server->{account}->{convert_nonprinting_characters}; $msg =~ s/[^[:print:]]/$separator/g if defined $separator; - $msg = encode($encoding, $msg) if ( $encoding ); + $msg = encode( $encoding, $msg ) if ($encoding); my $cksum; # $msg = encode_utf8($msg); if ($error_detection) { - if (defined($self->{seqno})) { + if ( defined( $self->{seqno} ) ) { $msg .= 'AY' . $self->{seqno}; } $msg .= 'AZ'; $cksum = checksum($msg); - $msg .= sprintf('%04.4X', $cksum); + $msg .= sprintf( '%04.4X', $cksum ); } STDOUT->autoflush(1); print $msg, $terminator; - siplog("LOG_INFO", "OUTPUT MSG: '$msg'"); + siplog( "LOG_INFO", "OUTPUT MSG: '$msg'" ); $last_response = $msg; } -- 2.39.5