mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Merge remote-tracking branch 'origin/topic/awelzel/4562-post-proc-lookup-failure'
* origin/topic/awelzel/4562-post-proc-lookup-failure:
btest/logging: Fly-by cleanup
logging/Ascii: Fix abort() for non-existing postrotation functions
(cherry picked from commit f4357485d2
)
This commit is contained in:
parent
356685d82d
commit
59a1c74ac5
7 changed files with 66 additions and 19 deletions
|
@ -744,10 +744,9 @@ void Ascii::RotateLeftoverLogs() {
|
|||
auto ppf = default_ppf;
|
||||
|
||||
if ( ! ll.post_proc_func.empty() ) {
|
||||
auto func = id::find_func(ll.post_proc_func.data());
|
||||
|
||||
if ( func )
|
||||
ppf = std::move(func);
|
||||
const auto& id = id::find(ll.post_proc_func.data());
|
||||
if ( id && id->GetVal() && same_type(id->GetVal()->GetType(), default_ppf->GetType()) )
|
||||
ppf = id->GetVal()->AsFuncVal()->AsFuncPtr();
|
||||
else
|
||||
reporter->Warning(
|
||||
"Could not postprocess log '%s' with intended "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue