From: Bill Erickson Date: Wed, 26 Dec 2012 18:53:39 +0000 (-0500) Subject: Set langauge value for patron info response X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fberick%2Fpatron-info-lang;p=working%2FSIPServer.git Set langauge value for patron info response Ensure the 3-char language field has a value (defaulting to '000') in the patron info response. Without the value, there is a 3-char offset in the response message fixed fields. Signed-off-by: Bill Erickson --- diff --git a/Sip/MsgType.pm b/Sip/MsgType.pm index abdeec2..6fb4793 100644 --- a/Sip/MsgType.pm +++ b/Sip/MsgType.pm @@ -919,6 +919,7 @@ sub handle_patron_info { my $fields = $self->{fields}; my ($inst_id, $patron_id, $terminal_pwd, $patron_pwd, $start, $end); my ($resp, $patron, $count); + $lang ||= '000'; # unspecified $inst_id = $fields->{(FID_INST_ID)}; $patron_id = $fields->{(FID_PATRON_ID)}; @@ -932,6 +933,8 @@ sub handle_patron_info { $resp = (PATRON_INFO_RESP); if ($patron) { $resp .= patron_status_string($patron); + + $lang = $patron->language if $patron->language; $resp .= $lang . Sip::timestamp(); $resp .= add_count('patron_info/hold_items', scalar @{$patron->hold_items });