Bug 5586

Summary: SIP line-endings should use proper SPEC-compliant \r
Product: Koha Reporter: Ian Walls <koha.sekjal>
Component: SIP2Assignee: Colin Campbell <colin.campbell>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: normal    
Priority: P3 CC: chris, ohiocore, paul.poulain
Version: 3.4   
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: 7619    
Attachments: Proposed patch

Description Ian Walls 2011-01-06 16:03:51 UTC
Line-endings have been a longstanding problem because of variations in implementations.  But we should still tryto default to the correct thing, according to what standards are available.
Comment 1 Ian Walls 2011-01-06 16:07:46 UTC
Created attachment 2956 [details] [review]
Proposed patch
Comment 2 Chris Cormack 2011-01-06 21:06:18 UTC
Pushed to new/bug_5586 (not merged to master yet)

Please test with a wide range of SIP devices and report your findings here.
Comment 3 Ian Walls 2011-01-08 21:58:09 UTC
Tested on Bluesocket, Userful, Envisionware and Cassie successfully.
Comment 4 Joe Atzberger 2011-01-09 17:08:51 UTC
Note, this is also the line-ending used by the Evergreen version of the SIP code, so all SIP devices connecting to EG are also compatible w/ the change.
Comment 5 Colin Campbell 2011-01-10 08:46:29 UTC
Works ok with the test scripts I've used to diagnose line ending problems in the past. Should work ok both with strictly compliant and CRLF units
Comment 6 Colin Campbell 2011-01-11 10:26:40 UTC
You can add 3M to the list of units tested against
Comment 7 Chris Cormack 2011-01-23 18:21:13 UTC
Merged to master, please test on master then mark resolved
Comment 8 Colin Campbell 2011-01-28 10:16:48 UTC
Patch is causing problems with latest 3M units if connecting over telnet. Looks like unit is not always recognizing the response causing timeouts. Reverting the patch solved problem. Investigating with 3M
Comment 9 Joe Atzberger 2011-01-28 14:34:27 UTC
(In reply to comment #8)
> Patch is causing problems with latest 3M units if connecting over telnet. Looks
> like unit is not always recognizing the response causing timeouts. Reverting
> the patch solved problem. Investigating with 3M

I suspect this is something where they had to configure in non-compliant line-endings (to match what we were doing).  If they just connect using "raw" setting and port, is there still a problem?  Please identify the models specifically so we can correlate information.
Comment 10 Colin Campbell 2011-01-31 16:43:07 UTC
Cause of problem identified. When printing with \n the output buffer is flushed even though you are on a buffered file handle. But \r does not do this for you therefore autoflush needs to be set on stdout
Comment 11 MJ Ray (software.coop) 2011-02-02 08:52:03 UTC
This bug is mentioned in:
Bug 5586: Set SIP line-endings	to proper SPEC-compliant \r http://lists.koha-community.org/pipermail/koha-patches/2011-January/013538.html
Comment 12 Paul Poulain 2012-03-01 10:30:25 UTC
There is a problem with 3M self-checkout systems that we use in France. The problem has been confirmed also by Frederic Demians, and the patch on bug 7619 solve it.