Fix on empty log extraction
This commit is contained in:
parent
ebff3ff753
commit
b9070d3a8e
|
@ -3680,20 +3680,17 @@ sub write_module_xml ($@) {
|
|||
|
||||
# Is it an extraction log module?
|
||||
if($module->{'type'} eq "log"){
|
||||
my $output = join('', @data);
|
||||
|
||||
if ($output eq "") {
|
||||
return;
|
||||
}
|
||||
|
||||
$Xml .="<log_module>\n";
|
||||
$Xml .= " <source><![CDATA[" . $module->{'name'} . "]]></source>\n";
|
||||
$Xml .= " <type><![CDATA[" . $module->{'type'} . "]]></type>\n";
|
||||
$Xml .= " <encoding>base64</encoding>\n";
|
||||
|
||||
# Data list
|
||||
if ($#data > 0) {
|
||||
$Xml .= " <data><![CDATA[" . join('', @data) . "]]></data>\n";
|
||||
# Single data
|
||||
} else {
|
||||
chomp ($data[0]);
|
||||
$Xml .= " <data><![CDATA[$data[0]]]></data>\n";
|
||||
}
|
||||
|
||||
$Xml .= " <data><![CDATA[" . $output . "]]></data>\n";
|
||||
$Xml .= "</log_module>\n";
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue