]> git.koha-community.org Git - koha.git/commit
Bug 13807 Rework main input loop in SIPServer
authorColin Campbell <colin.campbell@ptfs-europe.com>
Fri, 6 Mar 2015 11:57:09 +0000 (11:57 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 8 Jul 2016 14:59:50 +0000 (14:59 +0000)
commit94441be435d9be074fc0f93bbec2c2e9122a5d67
tree04625cf40eb5e10ecc309c7761027007d2e1c002
parent042e8cf24bf3de4192b4c7cf0ca4e5f1da6c3ce9
Bug 13807 Rework main input loop in SIPServer

Debugging various problems in SIPServer and control of it, found it
could loop on unread buffers (e.g. the LF of a CRLF if it was only
expecting CR) making it unresponsive to signals.
Reworked the input loop with an eye to removing unnecessary whiles
and replacing the while(1) by a while( connection valid)
Enhanced the timeout code by wapping in an eval.
Moved the logic from SIP_read_packet into the server itself
Hopefully this makes the already baroque code easier to navigate
and it did seem the server was the logical place for this
Removed no longer iused SIP_read_packet from Sip.pm

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/SIP/SIPServer.pm
C4/SIP/Sip.pm