From fba0512bae4808a1a7024c53de25e4a5b2339324 Mon Sep 17 00:00:00 2001 From: djfiander Date: Fri, 17 Oct 2008 23:57:52 +0000 Subject: [PATCH] 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). --- Sip.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.11.0