Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

fix(trap): fix regexp for trap argument ending by backslash #6699

Merged
merged 1 commit into from
Oct 18, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/perl/centreon/trapd/lib.pm
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ sub readtrap {
# If line begins with a double quote (") but does not END in a double quote then we need to merge
# the following lines together into one until we find the closing double quote. Allow for escaped quotes.
# Net-SNMP sometimes divides long lines into multiple lines..
if ( ($temp2 =~ /^\"/) && ( ! ($temp2 =~ /[^\\]\"$/)) ) {
if ( ($temp2 =~ /^\"/) && ( ! ($temp2 =~ /\"$/)) ) {
$args{logger}->writeLogDebug(" Multi-line value detected - merging onto one line...");
$temp2 =~ s/[\r\n]//g; # Remove the newline character
while (defined(my $line2 = <$input>)) {
Expand Down