From: djfiander Date: Fri, 17 Oct 2008 23:57:52 +0000 (+0000) Subject: Only try to strip off the leading newline if there's actually X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=fba0512bae4808a1a7024c53de25e4a5b2339324;p=SIPServer.git Only try to strip off the leading newline if there's actually content in the record at all (eliminate perl 'Use of uninitialized value' warning). --- diff --git a/Sip.pm b/Sip.pm index a1e586c..68379c1 100644 --- a/Sip.pm +++ b/Sip.pm @@ -176,7 +176,7 @@ sub read_SIP_packet { # So, the simplest thing to do is just throw away a leading newline # on the input. # - $record =~ s/^\012//; + $record =~ s/^\012// if $record; syslog("LOG_INFO", "INPUT MSG: '$record'") if $record; return $record; }