Bugzilla – Attachment 4372 Details for
Bug 6466
hung socket read causes SIP tests to fail
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
0001-Bug-6466-hung-socket-read-causes-SIP-tests-to-fail.patch (text/plain), 1.14 KB, created by
Mason James
on 2011-06-06 04:22:17 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Mason James
Created:
2011-06-06 04:22:17 UTC
Size:
1.14 KB
patch
obsolete
>From 38f431e296c84fcd04f42d21bc86adcc73b13f29 Mon Sep 17 00:00:00 2001 >From: JAMES Mason <mason@kohaaloha.com> >Date: Mon, 6 Jun 2011 16:10:39 +1200 >Subject: [PATCH] Bug 6466 - hung socket read causes SIP tests to fail >Content-Type: text/plain; charset="utf-8" >http://koha-community.org > >--- > C4/SIP/t/SIPtest.pm | 12 ++++++++---- > 1 files changed, 8 insertions(+), 4 deletions(-) > >diff --git a/C4/SIP/t/SIPtest.pm b/C4/SIP/t/SIPtest.pm >index 62d5646..ed11f8e 100644 >--- a/C4/SIP/t/SIPtest.pm >+++ b/C4/SIP/t/SIPtest.pm >@@ -185,10 +185,14 @@ sub one_msg { > > # If reading or writing fails, then the server's dead, > # so there's no point in continuing. >- if (!write_msg({seqno => $seqno}, $test->{msg}, $sock)) { >- BAIL_OUT("Write failure in $test->{id}"); >- } elsif (!($resp = <$sock>)) { >- BAIL_OUT("Read failure in $test->{id}"); >+ if ( !write_msg( { seqno => $seqno }, $test->{msg}, $sock ) ) { >+ BAIL_OUT("Write failure in $test->{id}"); >+ } >+ >+ my $rv = sysread( $sock, $resp, 10000000 ); # 10000000 is a big number >+ >+ if ( !$rv ) { >+ BAIL_OUT("Read failure in $test->{id}"); > } > > chomp($resp); >-- >1.7.1 >
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 6466
:
4372
|
6988