From 37cbdac2b72d48bb98087ae7fac30a5aa8e7bf21 Mon Sep 17 00:00:00 2001 From: djfiander Date: Tue, 6 Jun 2006 01:18:38 +0000 Subject: [PATCH] write_msg() is used by both the server and the test suite. In the test suite, we don't want to call syslog, so only call syslog if we're writing the message to stdout (which only happens in the server). --- Sip.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sip.pm b/Sip.pm index 36a0f53..f65aecf 100644 --- a/Sip.pm +++ b/Sip.pm @@ -148,12 +148,12 @@ sub write_msg { $msg .= sprintf('%4X', $cksum); } - syslog("LOG_DEBUG", "OUTPUT MSG: '$msg'"); if ($file) { print $file "$msg\r"; } else { print "$msg\r"; + syslog("LOG_DEBUG", "OUTPUT MSG: '$msg'"); } $last_response = $msg; -- 2.11.0