From d797881f3f8e3135f263312b5d369c7321013176 Mon Sep 17 00:00:00 2001 From: Joe Atzberger Date: Thu, 30 Sep 2010 23:31:19 +0000 Subject: [PATCH] Spec compliance on line-endings \r not CRLF --- Sip.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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'"); } -- 2.11.0