Bug 26897 - Blank SIP message closes SIP server connection
Summary: Blank SIP message closes SIP server connection
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: SIP2 (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-02 15:15 UTC by Nick Clemens (kidclamp)
Modified: 2020-12-14 09:57 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 26897: Don't close SIP connection when empty message is received (847 bytes, patch)
2020-12-14 09:56 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2020-11-02 15:15:26 UTC
in SIPServer.pm
sub sip_protocol_loop
308         my $previous_alarm = alarm($timeout);
309 
310         while ( my $inputbuf = read_request() ) {
311             if ( !defined $inputbuf ) {
312                 return;    #EOF
313             }


It seems some machines can send an empty response when sending store and forward requests. Rather than close on an empty string we should just ignore and keep processing, only disconnecting when requested or when timed out
Comment 1 Jonathan Druart 2020-12-14 09:56:47 UTC
Created attachment 114373 [details] [review]
Bug 26897: Don't close SIP connection when empty message is received
Comment 2 Jonathan Druart 2020-12-14 09:57:12 UTC
Nick, can you test this patch where you faced the problem?