Merge remote-tracking branch 'origin/topic/bernhard/log-threads' into topic/bernhard/log-threads

This commit is contained in:
Bernhard Amann 2012-02-13 02:35:10 -08:00
commit 1e4a93c767
2 changed files with 18 additions and 11 deletions

View file

@ -142,12 +142,12 @@ WriterBackend* Manager::CreateBackend(WriterFrontend* frontend, bro_int_t type)
return 0;
}
if ( ld->type == type )
break;
if ( ! ld->factory )
// Oops, we can't instantiate this guy.
return 0;
if ( ld->type != type )
{
// no, didn't find the right one...
++ld;
continue;
}
// If the writer has an init function, call it.
if ( ld->init )
@ -157,6 +157,7 @@ WriterBackend* Manager::CreateBackend(WriterFrontend* frontend, bro_int_t type)
// call it again later.
ld->init = 0;
else
{
// Init failed, disable by deleting factory
// function.
ld->factory = 0;
@ -166,8 +167,14 @@ WriterBackend* Manager::CreateBackend(WriterFrontend* frontend, bro_int_t type)
return false;
}
}
++ld;
if ( ! ld->factory )
// Oops, we can't instantiate this guy.
return 0;
// all done. break.
break;
}
assert(ld->factory);

View file

@ -1,6 +1,6 @@
#ifndef THREADING_SERIALIZATIONTYPES_H
#define THREADING_SERIALIZATIONTZPES_H
#define THREADING_SERIALIZATIONTYPES_H
#include "../RemoteSerializer.h"