From: djfiander Date: Tue, 6 Jun 2006 01:18:38 +0000 (+0000) Subject: write_msg() is used by both the server and the test suite. In X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=37cbdac2b72d48bb98087ae7fac30a5aa8e7bf21;p=SIPServer.git 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). --- 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;