]> 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)
committerJulian Maurice <julian.maurice@biblibre.com>
Wed, 17 Aug 2016 08:48:24 +0000 (10:48 +0200)
commit9df82f4a9db8808807ba61ebe74e77659ffe8728
treecbc89f81021bf4e11fbcc72973cfe90cc11ba834
parenta8cb9ba99ffc516cf7cff35aebee2d191d2b94e8
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>
(cherry picked from commit 94441be435d9be074fc0f93bbec2c2e9122a5d67)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 0817cf906f39d5b564f917ac4a2f0372fa332c43)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
C4/SIP/SIPServer.pm
C4/SIP/Sip.pm