Lines 266-279
sub new {
Link Here
|
266 |
# it's using the 2.00 login process, so it must support 2.00. |
266 |
# it's using the 2.00 login process, so it must support 2.00. |
267 |
$protocol_version = 2; |
267 |
$protocol_version = 2; |
268 |
} |
268 |
} |
269 |
syslog( "LOG_DEBUG", "Sip::MsgType::new('%s', '%s...', '%s'): seq.no '%s', protocol %s", $class, substr( $msg, 0, 10 ), $msgtag, $seqno, $protocol_version ); |
269 |
log( "LOG_DEBUG", "Sip::MsgType::new('%s', '%s...', '%s'): seq.no '%s', protocol %s", $class, substr( $msg, 0, 10 ), $msgtag, $seqno, $protocol_version ); |
270 |
|
270 |
|
271 |
# warn "SIP PROTOCOL: $protocol_version"; |
271 |
# warn "SIP PROTOCOL: $protocol_version"; |
272 |
if ( !exists( $handlers{$msgtag} ) ) { |
272 |
if ( !exists( $handlers{$msgtag} ) ) { |
273 |
syslog( "LOG_WARNING", "new Sip::MsgType: Skipping message of unknown type '%s' in '%s'", $msgtag, $msg ); |
273 |
log( "LOG_WARNING", "new Sip::MsgType: Skipping message of unknown type '%s' in '%s'", $msgtag, $msg ); |
274 |
return; |
274 |
return; |
275 |
} elsif ( !exists( $handlers{$msgtag}->{protocol}->{$protocol_version} ) ) { |
275 |
} elsif ( !exists( $handlers{$msgtag}->{protocol}->{$protocol_version} ) ) { |
276 |
syslog( "LOG_WARNING", "new Sip::MsgType: Skipping message '%s' unsupported by protocol rev. '%d'", $msgtag, $protocol_version ); |
276 |
log( "LOG_WARNING", "new Sip::MsgType: Skipping message '%s' unsupported by protocol rev. '%d'", $msgtag, $protocol_version ); |
277 |
return; |
277 |
return; |
278 |
} |
278 |
} |
279 |
|
279 |
|
Lines 305-311
sub _initialize {
Link Here
|
305 |
$self->{fields}->{$field} = undef; |
305 |
$self->{fields}->{$field} = undef; |
306 |
} |
306 |
} |
307 |
|
307 |
|
308 |
syslog( "LOG_DEBUG", "Sip::MsgType::_initialize('%s', '%s', '%s', '%s', ...)", $self->{name}, $msg, $proto->{template}, $proto->{template_len} ); |
308 |
log( "LOG_DEBUG", "Sip::MsgType::_initialize('%s', '%s', '%s', '%s', ...)", $self->{name}, $msg, $proto->{template}, $proto->{template_len} ); |
309 |
|
309 |
|
310 |
$self->{fixed_fields} = [ unpack( $proto->{template}, $msg ) ]; # see http://perldoc.perl.org/5.8.8/functions/unpack.html |
310 |
$self->{fixed_fields} = [ unpack( $proto->{template}, $msg ) ]; # see http://perldoc.perl.org/5.8.8/functions/unpack.html |
311 |
|
311 |
|
Lines 315-323
sub _initialize {
Link Here
|
315 |
$fn = substr( $field, 0, 2 ); |
315 |
$fn = substr( $field, 0, 2 ); |
316 |
|
316 |
|
317 |
if ( !exists( $self->{fields}->{$fn} ) ) { |
317 |
if ( !exists( $self->{fields}->{$fn} ) ) { |
318 |
syslog( "LOG_WARNING", "Unsupported field '%s' in %s message '%s'", $fn, $self->{name}, $msg ); |
318 |
log( "LOG_WARNING", "Unsupported field '%s' in %s message '%s'", $fn, $self->{name}, $msg ); |
319 |
} elsif ( defined( $self->{fields}->{$fn} ) ) { |
319 |
} elsif ( defined( $self->{fields}->{$fn} ) ) { |
320 |
syslog( "LOG_WARNING", "Duplicate field '%s' (previous value '%s') in %s message '%s'", $fn, $self->{fields}->{$fn}, $self->{name}, $msg ); |
320 |
log( "LOG_WARNING", "Duplicate field '%s' (previous value '%s') in %s message '%s'", $fn, $self->{fields}->{$fn}, $self->{name}, $msg ); |
321 |
} else { |
321 |
} else { |
322 |
$self->{fields}->{$fn} = substr( $field, 2 ); |
322 |
$self->{fields}->{$fn} = substr( $field, 2 ); |
323 |
} |
323 |
} |
Lines 366-372
sub handle {
Link Here
|
366 |
$error_detection = 1; |
366 |
$error_detection = 1; |
367 |
|
367 |
|
368 |
if ( !verify_cksum($msg) ) { |
368 |
if ( !verify_cksum($msg) ) { |
369 |
syslog( "LOG_WARNING", "Checksum failed on message '%s'", $msg ); |
369 |
log( "LOG_WARNING", "Checksum failed on message '%s'", $msg ); |
370 |
|
370 |
|
371 |
# REQUEST_SC_RESEND with error detection |
371 |
# REQUEST_SC_RESEND with error detection |
372 |
$last_response = REQUEST_SC_RESEND_CKSUM; |
372 |
$last_response = REQUEST_SC_RESEND_CKSUM; |
Lines 382-388
sub handle {
Link Here
|
382 |
|
382 |
|
383 |
# We received a non-ED message when ED is supposed to be active. |
383 |
# We received a non-ED message when ED is supposed to be active. |
384 |
# Warn about this problem, then process the message anyway. |
384 |
# Warn about this problem, then process the message anyway. |
385 |
syslog( "LOG_WARNING", "Received message without error detection: '%s'", $msg ); |
385 |
log( "LOG_WARNING", "Received message without error detection: '%s'", $msg ); |
386 |
$error_detection = 0; |
386 |
$error_detection = 0; |
387 |
$self = C4::SIP::Sip::MsgType->new( $msg, 0 ); |
387 |
$self = C4::SIP::Sip::MsgType->new( $msg, 0 ); |
388 |
} else { |
388 |
} else { |
Lines 395-401
sub handle {
Link Here
|
395 |
return substr( $msg, 0, 2 ); |
395 |
return substr( $msg, 0, 2 ); |
396 |
} |
396 |
} |
397 |
unless ( $self->{handler} ) { |
397 |
unless ( $self->{handler} ) { |
398 |
syslog( "LOG_WARNING", "No handler defined for '%s'", $msg ); |
398 |
log( "LOG_WARNING", "No handler defined for '%s'", $msg ); |
399 |
$last_response = REQUEST_SC_RESEND; |
399 |
$last_response = REQUEST_SC_RESEND; |
400 |
print("$last_response\r"); |
400 |
print("$last_response\r"); |
401 |
return REQUEST_ACS_RESEND; |
401 |
return REQUEST_ACS_RESEND; |
Lines 520-526
sub handle_checkout {
Link Here
|
520 |
|
520 |
|
521 |
# Off-line transactions need to be recorded, but there's |
521 |
# Off-line transactions need to be recorded, but there's |
522 |
# not a lot we can do about it |
522 |
# not a lot we can do about it |
523 |
syslog( "LOG_WARNING", "received no-block checkout from terminal '%s'", $account->{id} ); |
523 |
log( "LOG_WARNING", "received no-block checkout from terminal '%s'", $account->{id} ); |
524 |
|
524 |
|
525 |
$status = $ils->checkout_no_block( $patron_id, $item_id, $sc_renewal_policy, $trans_date, $nb_due_date ); |
525 |
$status = $ils->checkout_no_block( $patron_id, $item_id, $sc_renewal_policy, $trans_date, $nb_due_date ); |
526 |
} else { |
526 |
} else { |
Lines 647-653
sub handle_checkin {
Link Here
|
647 |
if ( $no_block eq 'Y' ) { |
647 |
if ( $no_block eq 'Y' ) { |
648 |
|
648 |
|
649 |
# Off-line transactions, ick. |
649 |
# Off-line transactions, ick. |
650 |
syslog( "LOG_WARNING", "received no-block checkin from terminal '%s'", $account->{id} ); |
650 |
log( "LOG_WARNING", "received no-block checkin from terminal '%s'", $account->{id} ); |
651 |
$status = $ils->checkin_no_block( $item_id, $trans_date, $return_date, $item_props, $cancel ); |
651 |
$status = $ils->checkin_no_block( $item_id, $trans_date, $return_date, $item_props, $cancel ); |
652 |
} else { |
652 |
} else { |
653 |
$status = $ils->checkin( $item_id, $trans_date, $return_date, $my_branch, $item_props, $cancel, $account->{checked_in_ok}, $account->{cv_triggers_alert} ); |
653 |
$status = $ils->checkin( $item_id, $trans_date, $return_date, $my_branch, $item_props, $cancel, $account->{checked_in_ok}, $account->{cv_triggers_alert} ); |
Lines 766-784
sub handle_sc_status {
Link Here
|
766 |
} elsif ( $sc_protocol_version =~ /^2\./ ) { |
766 |
} elsif ( $sc_protocol_version =~ /^2\./ ) { |
767 |
$new_proto = 2; |
767 |
$new_proto = 2; |
768 |
} else { |
768 |
} else { |
769 |
syslog( "LOG_WARNING", "Unrecognized protocol revision '%s', falling back to '1'", $sc_protocol_version ); |
769 |
log( "LOG_WARNING", "Unrecognized protocol revision '%s', falling back to '1'", $sc_protocol_version ); |
770 |
$new_proto = 1; |
770 |
$new_proto = 1; |
771 |
} |
771 |
} |
772 |
|
772 |
|
773 |
if ( $new_proto != $protocol_version ) { |
773 |
if ( $new_proto != $protocol_version ) { |
774 |
syslog( "LOG_INFO", "Setting protocol level to $new_proto" ); |
774 |
log( "LOG_INFO", "Setting protocol level to $new_proto" ); |
775 |
$protocol_version = $new_proto; |
775 |
$protocol_version = $new_proto; |
776 |
} |
776 |
} |
777 |
|
777 |
|
778 |
if ( $status == SC_STATUS_PAPER ) { |
778 |
if ( $status == SC_STATUS_PAPER ) { |
779 |
syslog( "LOG_WARNING", "Self-Check unit '%s@%s' out of paper", $self->{account}->{id}, $self->{account}->{institution} ); |
779 |
log( "LOG_WARNING", "Self-Check unit '%s@%s' out of paper", $self->{account}->{id}, $self->{account}->{institution} ); |
780 |
} elsif ( $status == SC_STATUS_SHUTDOWN ) { |
780 |
} elsif ( $status == SC_STATUS_SHUTDOWN ) { |
781 |
syslog( "LOG_WARNING", "Self-Check unit '%s@%s' shutting down", $self->{account}->{id}, $self->{account}->{institution} ); |
781 |
log( "LOG_WARNING", "Self-Check unit '%s@%s' shutting down", $self->{account}->{id}, $self->{account}->{institution} ); |
782 |
} |
782 |
} |
783 |
|
783 |
|
784 |
$self->{account}->{print_width} = $print_width; |
784 |
$self->{account}->{print_width} = $print_width; |
Lines 818-827
sub login_core {
Link Here
|
818 |
my $pwd = shift; |
818 |
my $pwd = shift; |
819 |
my $status = 1; # Assume it all works |
819 |
my $status = 1; # Assume it all works |
820 |
if ( !exists( $server->{config}->{accounts}->{$uid} ) ) { |
820 |
if ( !exists( $server->{config}->{accounts}->{$uid} ) ) { |
821 |
syslog( "LOG_WARNING", "MsgType::login_core: Unknown login '$uid'" ); |
821 |
log( "LOG_WARNING", "MsgType::login_core: Unknown login '$uid'" ); |
822 |
$status = 0; |
822 |
$status = 0; |
823 |
} elsif ( $server->{config}->{accounts}->{$uid}->{password} ne $pwd ) { |
823 |
} elsif ( $server->{config}->{accounts}->{$uid}->{password} ne $pwd ) { |
824 |
syslog( "LOG_WARNING", "MsgType::login_core: Invalid password for login '$uid'" ); |
824 |
log( "LOG_WARNING", "MsgType::login_core: Invalid password for login '$uid'" ); |
825 |
$status = 0; |
825 |
$status = 0; |
826 |
} else { |
826 |
} else { |
827 |
|
827 |
|
Lines 835-850
sub login_core {
Link Here
|
835 |
|
835 |
|
836 |
my $auth_status = api_auth( $uid, $pwd, $inst ); |
836 |
my $auth_status = api_auth( $uid, $pwd, $inst ); |
837 |
if ( !$auth_status or $auth_status !~ /^ok$/i ) { |
837 |
if ( !$auth_status or $auth_status !~ /^ok$/i ) { |
838 |
syslog( "LOG_WARNING", "api_auth failed for SIP terminal '%s' of '%s': %s", $uid, $inst, ( $auth_status || 'unknown' ) ); |
838 |
log( "LOG_WARNING", "api_auth failed for SIP terminal '%s' of '%s': %s", $uid, $inst, ( $auth_status || 'unknown' ) ); |
839 |
$status = 0; |
839 |
$status = 0; |
840 |
} else { |
840 |
} else { |
841 |
syslog( "LOG_INFO", "Successful login/auth for '%s' of '%s'", $server->{account}->{id}, $inst ); |
841 |
log( "LOG_INFO", "Successful login/auth for '%s' of '%s'", $server->{account}->{id}, $inst ); |
842 |
|
842 |
|
843 |
# |
843 |
# |
844 |
# initialize connection to ILS |
844 |
# initialize connection to ILS |
845 |
# |
845 |
# |
846 |
my $module = $server->{config}->{institutions}->{$inst}->{implementation}; |
846 |
my $module = $server->{config}->{institutions}->{$inst}->{implementation}; |
847 |
syslog( "LOG_DEBUG", 'login_core: ' . Dumper($module) ); |
847 |
log( "LOG_DEBUG", 'login_core: ' . Dumper($module) ); |
848 |
|
848 |
|
849 |
# Suspect this is always ILS but so we don't break any eccentic install (for now) |
849 |
# Suspect this is always ILS but so we don't break any eccentic install (for now) |
850 |
if ( $module eq 'ILS' ) { |
850 |
if ( $module eq 'ILS' ) { |
Lines 852-865
sub login_core {
Link Here
|
852 |
} |
852 |
} |
853 |
$module->use; |
853 |
$module->use; |
854 |
if ($@) { |
854 |
if ($@) { |
855 |
syslog( "LOG_ERR", "%s: Loading ILS implementation '%s' for institution '%s' failed", $server->{service}, $module, $inst ); |
855 |
log( "LOG_ERR", "%s: Loading ILS implementation '%s' for institution '%s' failed", $server->{service}, $module, $inst ); |
856 |
die("Failed to load ILS implementation '$module' for $inst"); |
856 |
die("Failed to load ILS implementation '$module' for $inst"); |
857 |
} |
857 |
} |
858 |
|
858 |
|
859 |
# like ILS->new(), I think. |
859 |
# like ILS->new(), I think. |
860 |
$server->{ils} = $module->new( $server->{institution}, $server->{account} ); |
860 |
$server->{ils} = $module->new( $server->{institution}, $server->{account} ); |
861 |
if ( !$server->{ils} ) { |
861 |
if ( !$server->{ils} ) { |
862 |
syslog( "LOG_ERR", "%s: ILS connection to '%s' failed", $server->{service}, $inst ); |
862 |
log( "LOG_ERR", "%s: ILS connection to '%s' failed", $server->{service}, $inst ); |
863 |
die("Unable to connect to ILS '$inst'"); |
863 |
die("Unable to connect to ILS '$inst'"); |
864 |
} |
864 |
} |
865 |
} |
865 |
} |
Lines 882-888
sub handle_login {
Link Here
|
882 |
$pwd = $fields->{ (FID_LOGIN_PWD) }; # Terminal PWD, not patron PWD. |
882 |
$pwd = $fields->{ (FID_LOGIN_PWD) }; # Terminal PWD, not patron PWD. |
883 |
|
883 |
|
884 |
if ( $uid_algorithm || $pwd_algorithm ) { |
884 |
if ( $uid_algorithm || $pwd_algorithm ) { |
885 |
syslog( "LOG_ERR", "LOGIN: Unsupported non-zero encryption method(s): uid = $uid_algorithm, pwd = $pwd_algorithm" ); |
885 |
log( "LOG_ERR", "LOGIN: Unsupported non-zero encryption method(s): uid = $uid_algorithm, pwd = $pwd_algorithm" ); |
886 |
$status = 0; |
886 |
$status = 0; |
887 |
} else { |
887 |
} else { |
888 |
$status = login_core( $server, $uid, $pwd ); |
888 |
$status = login_core( $server, $uid, $pwd ); |
Lines 921-933
sub summary_info {
Link Here
|
921 |
return ''; # No detailed information required |
921 |
return ''; # No detailed information required |
922 |
} |
922 |
} |
923 |
|
923 |
|
924 |
syslog( "LOG_DEBUG", "Summary_info: index == '%d', field '%s'", $summary_type, $summary_map[$summary_type]->{fid} ); |
924 |
log( "LOG_DEBUG", "Summary_info: index == '%d', field '%s'", $summary_type, $summary_map[$summary_type]->{fid} ); |
925 |
|
925 |
|
926 |
my $func = $summary_map[$summary_type]->{func}; |
926 |
my $func = $summary_map[$summary_type]->{func}; |
927 |
my $fid = $summary_map[$summary_type]->{fid}; |
927 |
my $fid = $summary_map[$summary_type]->{fid}; |
928 |
my $itemlist = &$func( $patron, $start, $end, $server ); |
928 |
my $itemlist = &$func( $patron, $start, $end, $server ); |
929 |
|
929 |
|
930 |
syslog( "LOG_DEBUG", "summary_info: list = (%s)", join( ", ", map{ $_->{barcode} } @{$itemlist} ) ); |
930 |
log( "LOG_DEBUG", "summary_info: list = (%s)", join( ", ", map{ $_->{barcode} } @{$itemlist} ) ); |
931 |
foreach my $i ( @{$itemlist} ) { |
931 |
foreach my $i ( @{$itemlist} ) { |
932 |
$resp .= add_field( $fid, $i->{barcode}, $server ); |
932 |
$resp .= add_field( $fid, $i->{barcode}, $server ); |
933 |
} |
933 |
} |
Lines 1245-1251
sub handle_item_status_update {
Link Here
|
1245 |
$item_props = $fields->{ (FID_ITEM_PROPS) }; |
1245 |
$item_props = $fields->{ (FID_ITEM_PROPS) }; |
1246 |
|
1246 |
|
1247 |
if ( !defined($item_id) ) { |
1247 |
if ( !defined($item_id) ) { |
1248 |
syslog( "LOG_WARNING", "handle_item_status: received message without Item ID field" ); |
1248 |
log( "LOG_WARNING", "handle_item_status: received message without Item ID field" ); |
1249 |
} else { |
1249 |
} else { |
1250 |
$item = $ils->find_item($item_id); |
1250 |
$item = $ils->find_item($item_id); |
1251 |
} |
1251 |
} |
Lines 1290-1296
sub handle_patron_enable {
Link Here
|
1290 |
$patron_id = $fields->{ (FID_PATRON_ID) }; |
1290 |
$patron_id = $fields->{ (FID_PATRON_ID) }; |
1291 |
$patron_pwd = $fields->{ (FID_PATRON_PWD) }; |
1291 |
$patron_pwd = $fields->{ (FID_PATRON_PWD) }; |
1292 |
|
1292 |
|
1293 |
syslog( "LOG_DEBUG", "handle_patron_enable: patron_id: '%s', patron_pwd: '%s'", $patron_id, $patron_pwd ); |
1293 |
log( "LOG_DEBUG", "handle_patron_enable: patron_id: '%s', patron_pwd: '%s'", $patron_id, $patron_pwd ); |
1294 |
|
1294 |
|
1295 |
$patron = $ils->find_patron($patron_id); |
1295 |
$patron = $ils->find_patron($patron_id); |
1296 |
|
1296 |
|
Lines 1360-1366
sub handle_hold {
Link Here
|
1360 |
} elsif ( $hold_mode eq '*' ) { |
1360 |
} elsif ( $hold_mode eq '*' ) { |
1361 |
$status = $ils->alter_hold( $patron_id, $patron_pwd, $item_id, $title_id, $expiry_date, $pickup_locn, $hold_type, $fee_ack ); |
1361 |
$status = $ils->alter_hold( $patron_id, $patron_pwd, $item_id, $title_id, $expiry_date, $pickup_locn, $hold_type, $fee_ack ); |
1362 |
} else { |
1362 |
} else { |
1363 |
syslog( "LOG_WARNING", "handle_hold: Unrecognized hold mode '%s' from terminal '%s'", $hold_mode, $server->{account}->{id} ); |
1363 |
log( "LOG_WARNING", "handle_hold: Unrecognized hold mode '%s' from terminal '%s'", $hold_mode, $server->{account}->{id} ); |
1364 |
$status = $ils->Transaction::Hold; # new? |
1364 |
$status = $ils->Transaction::Hold; # new? |
1365 |
$status->screen_msg("System error. Please contact library staff."); |
1365 |
$status->screen_msg("System error. Please contact library staff."); |
1366 |
} |
1366 |
} |
Lines 1408-1414
sub handle_renew {
Link Here
|
1408 |
$ils->check_inst_id( $fields->{ (FID_INST_ID) }, "handle_renew" ); |
1408 |
$ils->check_inst_id( $fields->{ (FID_INST_ID) }, "handle_renew" ); |
1409 |
|
1409 |
|
1410 |
if ( $no_block eq 'Y' ) { |
1410 |
if ( $no_block eq 'Y' ) { |
1411 |
syslog( "LOG_WARNING", "handle_renew: received 'no block' renewal from terminal '%s'", $server->{account}->{id} ); |
1411 |
log( "LOG_WARNING", "handle_renew: received 'no block' renewal from terminal '%s'", $server->{account}->{id} ); |
1412 |
} |
1412 |
} |
1413 |
|
1413 |
|
1414 |
$patron_id = $fields->{ (FID_PATRON_ID) }; |
1414 |
$patron_id = $fields->{ (FID_PATRON_ID) }; |
Lines 1575-1581
sub send_acs_status {
Link Here
|
1575 |
$retries = sprintf( "%03d", $policy->{retries} ); |
1575 |
$retries = sprintf( "%03d", $policy->{retries} ); |
1576 |
|
1576 |
|
1577 |
if ( length($retries) != 3 ) { |
1577 |
if ( length($retries) != 3 ) { |
1578 |
syslog( "LOG_ERR", "handle_acs_status: retries field wrong size: '%s'", $retries ); |
1578 |
log( "LOG_ERR", "handle_acs_status: retries field wrong size: '%s'", $retries ); |
1579 |
$retries = '000'; |
1579 |
$retries = '000'; |
1580 |
} |
1580 |
} |
1581 |
|
1581 |
|
Lines 1588-1594
sub send_acs_status {
Link Here
|
1588 |
} elsif ( $protocol_version == 2 ) { |
1588 |
} elsif ( $protocol_version == 2 ) { |
1589 |
$msg .= '2.00'; |
1589 |
$msg .= '2.00'; |
1590 |
} else { |
1590 |
} else { |
1591 |
syslog( "LOG_ERR", 'Bad setting for $protocol_version, "%s" in send_acs_status', $protocol_version ); |
1591 |
log( "LOG_ERR", 'Bad setting for $protocol_version, "%s" in send_acs_status', $protocol_version ); |
1592 |
$msg .= '1.00'; |
1592 |
$msg .= '1.00'; |
1593 |
} |
1593 |
} |
1594 |
|
1594 |
|
Lines 1608-1614
sub send_acs_status {
Link Here
|
1608 |
} |
1608 |
} |
1609 |
} |
1609 |
} |
1610 |
if ( length($supported_msgs) < 16 ) { |
1610 |
if ( length($supported_msgs) < 16 ) { |
1611 |
syslog( "LOG_ERR", 'send_acs_status: supported messages "%s" too short', $supported_msgs ); |
1611 |
log( "LOG_ERR", 'send_acs_status: supported messages "%s" too short', $supported_msgs ); |
1612 |
} |
1612 |
} |
1613 |
$msg .= add_field( FID_SUPPORTED_MSGS, $supported_msgs, $server ); |
1613 |
$msg .= add_field( FID_SUPPORTED_MSGS, $supported_msgs, $server ); |
1614 |
} |
1614 |
} |
Lines 1618-1624
sub send_acs_status {
Link Here
|
1618 |
if ( defined( $account->{print_width} ) |
1618 |
if ( defined( $account->{print_width} ) |
1619 |
&& defined($print_line) |
1619 |
&& defined($print_line) |
1620 |
&& $account->{print_width} < length($print_line) ) { |
1620 |
&& $account->{print_width} < length($print_line) ) { |
1621 |
syslog( "LOG_WARNING", "send_acs_status: print line '%s' too long. Truncating", $print_line ); |
1621 |
log( "LOG_WARNING", "send_acs_status: print line '%s' too long. Truncating", $print_line ); |
1622 |
$print_line = substr( $print_line, 0, $account->{print_width} ); |
1622 |
$print_line = substr( $print_line, 0, $account->{print_width} ); |
1623 |
} |
1623 |
} |
1624 |
|
1624 |
|
Lines 1638-1644
sub patron_status_string {
Link Here
|
1638 |
my $patron = shift; |
1638 |
my $patron = shift; |
1639 |
my $patron_status; |
1639 |
my $patron_status; |
1640 |
|
1640 |
|
1641 |
syslog( "LOG_DEBUG", "patron_status_string: %s charge_ok: %s", $patron->id, $patron->charge_ok ); |
1641 |
log( "LOG_DEBUG", "patron_status_string: %s charge_ok: %s", $patron->id, $patron->charge_ok ); |
1642 |
$patron_status = sprintf( |
1642 |
$patron_status = sprintf( |
1643 |
'%s%s%s%s%s%s%s%s%s%s%s%s%s%s', |
1643 |
'%s%s%s%s%s%s%s%s%s%s%s%s%s%s', |
1644 |
denied( $patron->charge_ok ), |
1644 |
denied( $patron->charge_ok ), |
1645 |
- |
|
|