From 8ed846f93581b4b69b4d08909808efdba6c2f0e6 Mon Sep 17 00:00:00 2001 From: Joe Atzberger Date: Mon, 10 May 2010 21:47:59 +0000 Subject: [PATCH] Patron password is a required field Alert type is part of the checkin extensions --- Sip/MsgType.pm | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Sip/MsgType.pm b/Sip/MsgType.pm index d19eed9..8b959f4 100644 --- a/Sip/MsgType.pm +++ b/Sip/MsgType.pm @@ -456,13 +456,8 @@ sub build_patron_status { $resp .= add_field(FID_PATRON_ID, $patron->id); if ($protocol_version >= 2) { $resp .= add_field(FID_VALID_PATRON, 'Y'); - # If the patron password field doesn't exist, then - # we can't report that the password was valid, now can - # we? But if it does exist, then we know it's valid. - if (defined($patron_pwd)) { - $resp .= add_field(FID_VALID_PATRON_PWD, - sipbool($patron->check_password($patron_pwd))); - } + # Patron password is a required field. + $resp .= add_field(FID_VALID_PATRON_PWD, sipbool($patron->check_password($patron_pwd))); $resp .= maybe_add(FID_CURRENCY, $patron->currency); $resp .= maybe_add(FID_FEE_AMT, $patron->fee_amount); } @@ -693,6 +688,7 @@ sub handle_checkin { } } + $resp .= maybe_add(FID_ALERT_TYPE, $status->alert_type) if $status->alert; $resp .= maybe_add(FID_SCREEN_MSG, $status->screen_msg); $resp .= maybe_add(FID_PRINT_LINE, $status->print_line); -- 2.11.0