Bug 25992: Make SIP2 logger subroutines exportable to prevent crash
authorJoonas Kylmälä <joonas.kylmala@helsinki.fi>
Wed, 15 Jul 2020 11:08:32 +0000 (11:08 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 24 Jul 2020 20:35:50 +0000 (20:35 +0000)
commita531a75b628b04ed5638ddaf5add19e84e6779b5
treef0abe3d4e56dc5bbf6c0e746dab654611d637d1d
parentfdaa7ce46a8071cefd846f563224c84590c504c9
Bug 25992: Make SIP2 logger subroutines exportable to prevent crash

If the subroutines are not exportable we get the following crash:

> Undefined subroutine &C4::SIP::SIPServer::set_logger

To test:
 In kohadevbox run for example:
 $ ps -aux # check that no existing sip server is running, kill the process if exists
 $ perl /kohadevbox/koha/C4/SIP/SIPServer.pm /etc/koha/sites/kohadev/SIPconfig.xml
 $ koha/misc/sip_cli_emulator.pl -su koha -sp koha -l CPL -a 127.0.0.1 -p 6001 --item 3999900000001 -m item_information

 After applying this patch the Undefined subroutine error should be gone.
 Note: when using the sip_cli_emulator.pl the credentials can be anything.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 082da615e649146197fbc9e0a20da672a82d4816)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
C4/SIP/Logger.pm