From d902afc7dba77dce2e553b300255081da37cfdb9 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 7 Aug 2019 13:18:44 +0200 Subject: [PATCH] XML::SAX::ExpatXS thread protection --- pandora_server/lib/PandoraFMS/DataServer.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/DataServer.pm b/pandora_server/lib/PandoraFMS/DataServer.pm index 1e827ec7b0..134fc43ed2 100644 --- a/pandora_server/lib/PandoraFMS/DataServer.pm +++ b/pandora_server/lib/PandoraFMS/DataServer.pm @@ -195,11 +195,11 @@ sub data_consumer ($$) { eval { threads->yield; # XML::SAX::ExpatXS is not thread safe. - if ($XML::Simple::PREFERRED_PARSER == 'XML::SAX::ExpatXS') { + if ($XML::Simple::PREFERRED_PARSER eq 'XML::SAX::ExpatXS') { $XMLinSem->down(); } $xml_data = XMLin ($file_name, forcearray => 'module'); - if ($XML::Simple::PREFERRED_PARSER == 'XML::SAX::ExpatXS') { + if ($XML::Simple::PREFERRED_PARSER eq 'XML::SAX::ExpatXS') { $XMLinSem->up(); } };