From c2a336be7d3f484bf145befb11096ea31b0b0d9a Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Thu, 2 Apr 2015 16:19:31 +0100 Subject: [PATCH] Bug 12225 Correct unpacking templates for fixed fields Single characters were being unpacked using the template 'C' this reads a character but rather than returning a single character string as the module elsewhere assumes returns the value of that octet. e.g. the code may be testing for a value of 'Y' but the variable is set to '89' The incorrect formats have hidden that the routines called for handling non blocking transactions are non existant as the normal ('blocking') obes get called Also the server is not identifying the 'shutting down' status in SC Status methods --- C4/SIP/Sip/MsgType.pm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/C4/SIP/Sip/MsgType.pm b/C4/SIP/Sip/MsgType.pm index 5ef7465..b43da7c 100644 --- a/C4/SIP/Sip/MsgType.pm +++ b/C4/SIP/Sip/MsgType.pm @@ -66,13 +66,13 @@ my %handlers = ( handler => \&handle_checkout, protocol => { 1 => { - template => "CCA18A18", + template => 'A1A1A18A18', template_len => 38, fields => [(FID_INST_ID), (FID_PATRON_ID), (FID_ITEM_ID), (FID_TERMINAL_PWD)], }, 2 => { - template => "CCA18A18", + template => 'A1A1A18A18', template_len => 38, fields => [(FID_INST_ID), (FID_PATRON_ID), (FID_ITEM_ID), (FID_TERMINAL_PWD), @@ -86,13 +86,13 @@ my %handlers = ( handler => \&handle_checkin, protocol => { 1 => { - template => "CA18A18", + template => 'A1A18A18', template_len => 37, fields => [(FID_CURRENT_LOCN), (FID_INST_ID), (FID_ITEM_ID), (FID_TERMINAL_PWD)], }, 2 => { - template => "CA18A18", + template => 'A1A18A18', template_len => 37, fields => [(FID_CURRENT_LOCN), (FID_INST_ID), (FID_ITEM_ID), (FID_TERMINAL_PWD), @@ -105,7 +105,7 @@ my %handlers = ( handler => \&handle_block_patron, protocol => { 1 => { - template => "CA18", + template => 'A1A18', template_len => 19, fields => [(FID_INST_ID), (FID_BLOCKED_CARD_MSG), (FID_PATRON_ID), (FID_TERMINAL_PWD)], @@ -117,7 +117,7 @@ my %handlers = ( handler => \&handle_sc_status, protocol => { 1 => { - template =>"CA3A4", + template =>'A1A3A4', template_len => 8, fields => [], } @@ -128,7 +128,7 @@ my %handlers = ( handler => \&handle_request_acs_resend, protocol => { 1 => { - template => "", + template => q{}, template_len => 0, fields => [], } @@ -242,7 +242,7 @@ my %handlers = ( handler => \&handle_renew, protocol => { 2 => { - template => "CCA18A18", + template => 'A1A1A18A18', template_len => 38, fields => [(FID_INST_ID), (FID_PATRON_ID), (FID_PATRON_PWD), (FID_ITEM_ID), -- 2.1.0