Lines 486-492
sub handle_patron_status {
Link Here
|
486 |
$ils->check_inst_id($fields->{(FID_INST_ID)}, "handle_patron_status"); |
486 |
$ils->check_inst_id($fields->{(FID_INST_ID)}, "handle_patron_status"); |
487 |
$patron = $ils->find_patron($fields->{(FID_PATRON_ID)}); |
487 |
$patron = $ils->find_patron($fields->{(FID_PATRON_ID)}); |
488 |
$resp = build_patron_status($patron, $lang, $fields); |
488 |
$resp = build_patron_status($patron, $lang, $fields); |
489 |
$self->write_msg($resp); |
489 |
$self->write_msg($resp,undef,$server->{account}->{terminator}); |
490 |
return (PATRON_STATUS_REQ); |
490 |
return (PATRON_STATUS_REQ); |
491 |
} |
491 |
} |
492 |
|
492 |
|
Lines 604-610
sub handle_checkout {
Link Here
|
604 |
} |
604 |
} |
605 |
} |
605 |
} |
606 |
|
606 |
|
607 |
$self->write_msg($resp); |
607 |
$self->write_msg($resp,undef,$server->{account}->{terminator}); |
608 |
return(CHECKOUT); |
608 |
return(CHECKOUT); |
609 |
} |
609 |
} |
610 |
|
610 |
|
Lines 692-698
sub handle_checkin {
Link Here
|
692 |
$resp .= maybe_add(FID_SCREEN_MSG, $status->screen_msg); |
692 |
$resp .= maybe_add(FID_SCREEN_MSG, $status->screen_msg); |
693 |
$resp .= maybe_add(FID_PRINT_LINE, $status->print_line); |
693 |
$resp .= maybe_add(FID_PRINT_LINE, $status->print_line); |
694 |
|
694 |
|
695 |
$self->write_msg($resp); |
695 |
$self->write_msg($resp,undef,$server->{account}->{terminator}); |
696 |
|
696 |
|
697 |
return(CHECKIN); |
697 |
return(CHECKIN); |
698 |
} |
698 |
} |
Lines 736-742
sub handle_block_patron {
Link Here
|
736 |
} |
736 |
} |
737 |
|
737 |
|
738 |
$resp = build_patron_status($patron, $patron->language, $fields); |
738 |
$resp = build_patron_status($patron, $patron->language, $fields); |
739 |
$self->write_msg($resp); |
739 |
$self->write_msg($resp,undef,$server->{account}->{terminator}); |
740 |
return(BLOCK_PATRON); |
740 |
return(BLOCK_PATRON); |
741 |
} |
741 |
} |
742 |
|
742 |
|
Lines 778-784
sub handle_request_acs_resend {
Link Here
|
778 |
if (!$last_response) { |
778 |
if (!$last_response) { |
779 |
# We haven't sent anything yet, so respond with a |
779 |
# We haven't sent anything yet, so respond with a |
780 |
# REQUEST_SC_RESEND msg (p. 16) |
780 |
# REQUEST_SC_RESEND msg (p. 16) |
781 |
$self->write_msg(REQUEST_SC_RESEND); |
781 |
$self->write_msg(REQUEST_SC_RESEND,undef,$server->{account}->{terminator}); |
782 |
} elsif ((length($last_response) < 9) |
782 |
} elsif ((length($last_response) < 9) |
783 |
|| substr($last_response, -9, 2) ne 'AY') { |
783 |
|| substr($last_response, -9, 2) ne 'AY') { |
784 |
# When resending a message, we aren't supposed to include |
784 |
# When resending a message, we aren't supposed to include |
Lines 790-796
sub handle_request_acs_resend {
Link Here
|
790 |
# Cut out the sequence number and checksum, since the old |
790 |
# Cut out the sequence number and checksum, since the old |
791 |
# checksum is wrong for the resent message. |
791 |
# checksum is wrong for the resent message. |
792 |
my $rebuilt = substr($last_response, 0, -9); |
792 |
my $rebuilt = substr($last_response, 0, -9); |
793 |
$self->write_msg($rebuilt); |
793 |
$self->write_msg($rebuilt,undef,$server->{account}->{terminator}); |
794 |
} |
794 |
} |
795 |
|
795 |
|
796 |
return REQUEST_ACS_RESEND; |
796 |
return REQUEST_ACS_RESEND; |
Lines 866-872
sub handle_login {
Link Here
|
866 |
} |
866 |
} |
867 |
else { $status = login_core($server,$uid,$pwd); } |
867 |
else { $status = login_core($server,$uid,$pwd); } |
868 |
|
868 |
|
869 |
$self->write_msg(LOGIN_RESP . $status); |
869 |
$self->write_msg(LOGIN_RESP . $status,undef,$server->{account}->{terminator}); |
870 |
return $status ? LOGIN : ''; |
870 |
return $status ? LOGIN : ''; |
871 |
} |
871 |
} |
872 |
|
872 |
|
Lines 1012-1018
sub handle_patron_info {
Link Here
|
1012 |
} |
1012 |
} |
1013 |
} |
1013 |
} |
1014 |
|
1014 |
|
1015 |
$self->write_msg($resp); |
1015 |
$self->write_msg($resp,undef,$server->{account}->{terminator}); |
1016 |
return(PATRON_INFO); |
1016 |
return(PATRON_INFO); |
1017 |
} |
1017 |
} |
1018 |
|
1018 |
|
Lines 1039-1045
sub handle_end_patron_session {
Link Here
|
1039 |
$resp .= maybe_add(FID_SCREEN_MSG, $screen_msg); |
1039 |
$resp .= maybe_add(FID_SCREEN_MSG, $screen_msg); |
1040 |
$resp .= maybe_add(FID_PRINT_LINE, $print_line); |
1040 |
$resp .= maybe_add(FID_PRINT_LINE, $print_line); |
1041 |
|
1041 |
|
1042 |
$self->write_msg($resp); |
1042 |
$self->write_msg($resp,undef,$server->{account}->{terminator}); |
1043 |
|
1043 |
|
1044 |
return(END_PATRON_SESSION); |
1044 |
return(END_PATRON_SESSION); |
1045 |
} |
1045 |
} |
Lines 1073-1079
sub handle_fee_paid {
Link Here
|
1073 |
$resp .= maybe_add(FID_SCREEN_MSG, $status->screen_msg); |
1073 |
$resp .= maybe_add(FID_SCREEN_MSG, $status->screen_msg); |
1074 |
$resp .= maybe_add(FID_PRINT_LINE, $status->print_line); |
1074 |
$resp .= maybe_add(FID_PRINT_LINE, $status->print_line); |
1075 |
|
1075 |
|
1076 |
$self->write_msg($resp); |
1076 |
$self->write_msg($resp,undef,$server->{account}->{terminator}); |
1077 |
|
1077 |
|
1078 |
return(FEE_PAID); |
1078 |
return(FEE_PAID); |
1079 |
} |
1079 |
} |
Lines 1140-1146
sub handle_item_information {
Link Here
|
1140 |
$resp .= maybe_add(FID_PRINT_LINE, $item->print_line); |
1140 |
$resp .= maybe_add(FID_PRINT_LINE, $item->print_line); |
1141 |
} |
1141 |
} |
1142 |
|
1142 |
|
1143 |
$self->write_msg($resp); |
1143 |
$self->write_msg($resp,undef,$server->{account}->{terminator}); |
1144 |
|
1144 |
|
1145 |
return(ITEM_INFORMATION); |
1145 |
return(ITEM_INFORMATION); |
1146 |
} |
1146 |
} |
Lines 1189-1195
sub handle_item_status_update {
Link Here
|
1189 |
$resp .= maybe_add(FID_SCREEN_MSG, $status->screen_msg); |
1189 |
$resp .= maybe_add(FID_SCREEN_MSG, $status->screen_msg); |
1190 |
$resp .= maybe_add(FID_PRINT_LINE, $status->print_line); |
1190 |
$resp .= maybe_add(FID_PRINT_LINE, $status->print_line); |
1191 |
|
1191 |
|
1192 |
$self->write_msg($resp); |
1192 |
$self->write_msg($resp,undef,$server->{account}->{terminator}); |
1193 |
|
1193 |
|
1194 |
return(ITEM_STATUS_UPDATE); |
1194 |
return(ITEM_STATUS_UPDATE); |
1195 |
} |
1195 |
} |
Lines 1240-1246
sub handle_patron_enable {
Link Here
|
1240 |
|
1240 |
|
1241 |
$resp .= add_field(FID_INST_ID, $ils->institution); |
1241 |
$resp .= add_field(FID_INST_ID, $ils->institution); |
1242 |
|
1242 |
|
1243 |
$self->write_msg($resp); |
1243 |
$self->write_msg($resp,undef,$server->{account}->{terminator}); |
1244 |
|
1244 |
|
1245 |
return(PATRON_ENABLE); |
1245 |
return(PATRON_ENABLE); |
1246 |
} |
1246 |
} |
Lines 1306-1312
sub handle_hold {
Link Here
|
1306 |
$resp .= maybe_add(FID_SCREEN_MSG, $status->screen_msg); |
1306 |
$resp .= maybe_add(FID_SCREEN_MSG, $status->screen_msg); |
1307 |
$resp .= maybe_add(FID_PRINT_LINE, $status->print_line); |
1307 |
$resp .= maybe_add(FID_PRINT_LINE, $status->print_line); |
1308 |
|
1308 |
|
1309 |
$self->write_msg($resp); |
1309 |
$self->write_msg($resp,undef,$server->{account}->{terminator}); |
1310 |
|
1310 |
|
1311 |
return(HOLD); |
1311 |
return(HOLD); |
1312 |
} |
1312 |
} |
Lines 1395-1401
sub handle_renew {
Link Here
|
1395 |
$resp .= maybe_add(FID_SCREEN_MSG, $status->screen_msg); |
1395 |
$resp .= maybe_add(FID_SCREEN_MSG, $status->screen_msg); |
1396 |
$resp .= maybe_add(FID_PRINT_LINE, $status->print_line); |
1396 |
$resp .= maybe_add(FID_PRINT_LINE, $status->print_line); |
1397 |
|
1397 |
|
1398 |
$self->write_msg($resp); |
1398 |
$self->write_msg($resp,undef,$server->{account}->{terminator}); |
1399 |
|
1399 |
|
1400 |
return(RENEW); |
1400 |
return(RENEW); |
1401 |
} |
1401 |
} |
Lines 1445-1451
sub handle_renew_all {
Link Here
|
1445 |
$resp .= maybe_add(FID_SCREEN_MSG, $status->screen_msg); |
1445 |
$resp .= maybe_add(FID_SCREEN_MSG, $status->screen_msg); |
1446 |
$resp .= maybe_add(FID_PRINT_LINE, $status->print_line); |
1446 |
$resp .= maybe_add(FID_PRINT_LINE, $status->print_line); |
1447 |
|
1447 |
|
1448 |
$self->write_msg($resp); |
1448 |
$self->write_msg($resp,undef,$server->{account}->{terminator}); |
1449 |
|
1449 |
|
1450 |
return(RENEW_ALL); |
1450 |
return(RENEW_ALL); |
1451 |
} |
1451 |
} |
Lines 1555-1561
sub send_acs_status {
Link Here
|
1555 |
|
1555 |
|
1556 |
# Do we want to tell the terminal its location? |
1556 |
# Do we want to tell the terminal its location? |
1557 |
|
1557 |
|
1558 |
$self->write_msg($msg); |
1558 |
$self->write_msg($msg,undef,$server->{account}->{terminator}); |
1559 |
return 1; |
1559 |
return 1; |
1560 |
} |
1560 |
} |
1561 |
|
1561 |
|