From 07994fbc5cd642a65af1400bc772ed02bba02192 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 26 Dec 2012 13:53:39 -0500 Subject: [PATCH] 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 --- Sip/MsgType.pm | 3 +++ 1 file changed, 3 insertions(+) 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 }); -- 2.11.0