From: Joe Atzberger Date: Thu, 30 Sep 2010 23:31:19 +0000 (+0000) Subject: Spec compliance on line-endings X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d797881f3f8e3135f263312b5d369c7321013176;p=working%2FSIPServer.git Spec compliance on line-endings \r not CRLF --- diff --git a/Sip.pm b/Sip.pm index 8d226a2..df75664 100644 --- a/Sip.pm +++ b/Sip.pm @@ -162,7 +162,7 @@ sub read_SIP_packet { my $len1 = 999; # local $/ = "\r"; # don't need any of these here. use whatever the prevailing $/ is. - # local $/ = "\015"; # proper SPEC: (octal) \015 = (hex) x0D = (dec) 13 = (ascii) carriage return + local $/ = "\015"; # proper SPEC: (octal) \015 = (hex) x0D = (dec) 13 = (ascii) carriage return { # adapted from http://perldoc.perl.org/5.8.8/functions/readline.html for ( my $tries = 1 ; $tries <= 3 ; $tries++ ) { undef $!; @@ -238,9 +238,9 @@ sub write_msg { if ($file) { - print $file "$msg$CRLF"; + print $file "$msg\r"; } else { - print "$msg$CRLF"; + print "$msg\r"; syslog("LOG_INFO", "OUTPUT MSG: '$msg'"); }