Bugzilla – Attachment 4698 Details for
Bug 6620
Sip Server Output may be buffered
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed Patch
0001-Bug-6620-Ensure-autoflush-is-set-on-output-filehandl.patch (text/plain), 1.25 KB, created by
Colin Campbell
on 2011-07-21 11:26:50 UTC
(
hide
)
Description:
Proposed Patch
Filename:
MIME Type:
Creator:
Colin Campbell
Created:
2011-07-21 11:26:50 UTC
Size:
1.25 KB
patch
obsolete
>From a21141d640e97f47c2b3ad222da3ba272876ae21 Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Thu, 21 Jul 2011 12:16:22 +0100 >Subject: [PATCH] Bug 6620 Ensure autoflush is set on output filehandles >Content-Type: text/plain; charset="utf-8" > >stdout is by default buffered and a flush is only guaranteed on CR >Sip responses are not CR terminated so we need to ensure autoflush >is switched on so that the filehandle is flushed after a print >Otherwise this can manifest as self checks running slow or >failing due to timeout (although in the log we see the response) >--- > C4/SIP/Sip.pm | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > >diff --git a/C4/SIP/Sip.pm b/C4/SIP/Sip.pm >index 8a0f067..337cc0e 100644 >--- a/C4/SIP/Sip.pm >+++ b/C4/SIP/Sip.pm >@@ -12,6 +12,7 @@ use Exporter; > use Sys::Syslog qw(syslog); > use POSIX qw(strftime); > use Socket qw(:crlf); >+use IO::Handle; > > use Sip::Constants qw(SIP_DATETIME); > use Sip::Checksum qw(checksum); >@@ -230,9 +231,11 @@ sub write_msg { > > > if ($file) { >+ $file->autoflush(1); > print $file "$msg\r"; > } else { >- print "$msg\r"; >+ STDOUT->autoflush(1); >+ print $msg, "\r"; > syslog("LOG_INFO", "OUTPUT MSG: '$msg'"); > } > >-- >1.7.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6620
: 4698 |
5415