mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
Merge remote-tracking branch 'origin/topic/bernhard/log-threads' into topic/bernhard/log-threads
This commit is contained in:
commit
1e4a93c767
2 changed files with 18 additions and 11 deletions
|
@ -142,12 +142,12 @@ WriterBackend* Manager::CreateBackend(WriterFrontend* frontend, bro_int_t type)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ld->type == type )
|
if ( ld->type != type )
|
||||||
break;
|
{
|
||||||
|
// no, didn't find the right one...
|
||||||
if ( ! ld->factory )
|
++ld;
|
||||||
// Oops, we can't instantiate this guy.
|
continue;
|
||||||
return 0;
|
}
|
||||||
|
|
||||||
// If the writer has an init function, call it.
|
// If the writer has an init function, call it.
|
||||||
if ( ld->init )
|
if ( ld->init )
|
||||||
|
@ -157,17 +157,24 @@ WriterBackend* Manager::CreateBackend(WriterFrontend* frontend, bro_int_t type)
|
||||||
// call it again later.
|
// call it again later.
|
||||||
ld->init = 0;
|
ld->init = 0;
|
||||||
else
|
else
|
||||||
|
{
|
||||||
// Init failed, disable by deleting factory
|
// Init failed, disable by deleting factory
|
||||||
// function.
|
// function.
|
||||||
ld->factory = 0;
|
ld->factory = 0;
|
||||||
|
|
||||||
DBG_LOG(DBG_LOGGING, "failed to init writer class %s",
|
DBG_LOG(DBG_LOGGING, "failed to init writer class %s",
|
||||||
ld->name);
|
ld->name);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
++ld;
|
if ( ! ld->factory )
|
||||||
|
// Oops, we can't instantiate this guy.
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
// all done. break.
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(ld->factory);
|
assert(ld->factory);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
#ifndef THREADING_SERIALIZATIONTYPES_H
|
#ifndef THREADING_SERIALIZATIONTYPES_H
|
||||||
#define THREADING_SERIALIZATIONTZPES_H
|
#define THREADING_SERIALIZATIONTYPES_H
|
||||||
|
|
||||||
#include "../RemoteSerializer.h"
|
#include "../RemoteSerializer.h"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue