Bug 13432

Summary: SIP Server does not respect timeout setting
Product: Koha Reporter: Kyle M Hall <kyle>
Component: SIP2Assignee: Kyle M Hall <kyle>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: chris, colin.campbell, jdemuth, mtj, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 7904, 15006    
Attachments: Bug 13432 - SIP Server does not respect timeout setting
Patch Signed Off
Bug 13432 - SIP Server does not respect timeout setting

Description Kyle M Hall 2014-12-10 18:42:15 UTC
Koha's SIP server accepts timeout parameters, but those parameters
are only used for the login portion of a telnet transport session.
Other than that, they are ignored, and as long as whatever opened
the connection keeps it open, it will stay open indefinitely.
Comment 1 Kyle M Hall 2014-12-10 18:46:41 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2014-12-10 18:49:35 UTC
Note, you really only need to sleep for 20 to 30 seconds, not 100.
Comment 3 Colin Campbell 2015-01-06 14:03:30 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2015-01-28 10:37:46 UTC
Created attachment 35573 [details] [review]
Bug 13432 - SIP Server does not respect timeout setting

Koha's SIP server accepts timeout parameters, but those parameters
are only used for the login portion of a telnet transport session.
Other than that, they are ignored, and as long as whatever opened
the connection keeps it open, it will stay open indefinitely.

Test Plan:
1) Set the timeout setting on your SIP server to 10 seconds
2) Modify misc/sip_cli_emulator.pl, add "sleep 100;" directly after line 91
3) Start your SIP server
4) Run the modified sip script with valid parameters
5) Watch the SIP server stderr
6) Note that even though the script waits far too long before continuing,
   the SIP server never kills the connection, and the requests the cli
   script makes come back with valid data.
7) Apply this patch
8) Restart your SIP server
9) Repeat step 4
10) Note that this time you see "SIP Timed Out!" in the SIP server
    stderr and when the script finally makes it's request, it doesn't
    come back with valid data.

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 5 Tomás Cohen Arazi 2015-02-05 17:57:57 UTC
Patch pushed to master.

Thanks Kyle!
Comment 6 Chris Cormack 2015-02-09 20:44:28 UTC
Pushed to 3.18.x will be in 3.18.4
Comment 7 Mason James 2015-02-26 03:05:50 UTC
(In reply to Chris Cormack from comment #6)
> Pushed to 3.18.x will be in 3.18.4

Pushed to 3.16.x, will be in 3.16.8