This came up with a SIP vendor recently - when reading responses they were only getting part of a patron's information. It seemed to have been caused by patrons with multiple restrictions and a new line in the response The simple fix was: <screen_msg_regex find="\n" replace=" -- " /> We should possibly add this as an option rather than relying on regex
Created attachment 171642 [details] [review] Bug 37582: Add ability to for SIP to convert control and separator characters to spaces This came up with a SIP vendor recently - when reading responses they were only getting part of a patron's information. It seemed to have been caused by patrons with multiple restrictions and a new line in the response Test Plan: 1) Add multiple debarments to a patron 2) Run a sip patron information response, note the presence of newlines 3) Apply this patch 4) Add the new option convert_control_characters to your SIP account, set the value to " -- " 5) Restart all the things! 7) Run a sip patron information response, note the newlines have been replaced!
Created attachment 171643 [details] [review] Bug 37582: Add ability to for SIP to convert control and separator characters to spaces This came up with a SIP vendor recently - when reading responses they were only getting part of a patron's information. It seemed to have been caused by patrons with multiple restrictions and a new line in the response This patch also does minor refactoring to write_msg to pass the server variable that contains all the previously passed parameters, and removes the never used "file" parameter. Test Plan: 1) Add multiple debarments to a patron 2) Run a sip patron information response, note the presence of newlines 3) Apply this patch 4) Add the new option convert_control_characters to your SIP account, set the value to " -- " 5) Restart all the things! 7) Run a sip patron information response, note the newlines have been replaced!
Created attachment 171644 [details] [review] Bug 37582: Tidy write_msg