]> 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)
committerFrédéric Demians <f.demians@tamil.fr>
Mon, 1 Aug 2016 09:37:55 +0000 (11:37 +0200)
commit0817cf906f39d5b564f917ac4a2f0372fa332c43
tree11bacbd5f8cd3637a7113463f318c54e24694c82
parentf9b989e3dd0e6e1a6d92c34a3c325ec14b749231
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>
C4/SIP/SIPServer.pm
C4/SIP/Sip.pm