mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 08:38:20 +00:00
Merge remote-tracking branch 'origin/topic/bernhard/input-crash-search'
* origin/topic/bernhard/input-crash-search: for bug-searching: Closes #840
This commit is contained in:
commit
9183309482
6 changed files with 28 additions and 9 deletions
10
CHANGES
10
CHANGES
|
@ -1,4 +1,14 @@
|
|||
|
||||
2.0-723 | 2012-07-02 15:02:56 -0700
|
||||
|
||||
* Extract ICMPv6 NDP options and include in ICMP events. This adds
|
||||
a new parameter of type "icmp6_nd_options" to the ICMPv6 neighbor
|
||||
discovery events. Addresses #833. (Jon Siwek)
|
||||
|
||||
* Set input frontend type before starting the thread. This means
|
||||
that the thread type will be output correctly in the error
|
||||
message. (Bernhard Amann)
|
||||
|
||||
2.0-719 | 2012-07-02 14:49:03 -0700
|
||||
|
||||
* Fix inconsistencies in random number generation. The
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
2.0-719
|
||||
2.0-723
|
||||
|
|
|
@ -255,10 +255,10 @@ ReaderBackend* Manager::CreateBackend(ReaderFrontend* frontend, bro_int_t type)
|
|||
|
||||
assert(ir->factory);
|
||||
|
||||
frontend->SetTypeName(ir->name);
|
||||
ReaderBackend* backend = (*ir->factory)(frontend);
|
||||
assert(backend);
|
||||
|
||||
frontend->ty_name = ir->name;
|
||||
return backend;
|
||||
}
|
||||
|
||||
|
|
|
@ -115,6 +115,11 @@ protected:
|
|||
*/
|
||||
const string& TypeName() const { return ty_name; }
|
||||
|
||||
/**
|
||||
* Sets the name of the backend's type.
|
||||
*/
|
||||
void SetTypeName(const string& name) const { ty_name = name; }
|
||||
|
||||
private:
|
||||
ReaderBackend* backend; // The backend we have instanatiated.
|
||||
string source;
|
||||
|
|
|
@ -191,10 +191,10 @@ WriterBackend* Manager::CreateBackend(WriterFrontend* frontend, bro_int_t type)
|
|||
|
||||
assert(ld->factory);
|
||||
|
||||
frontend->ty_name = ld->name;
|
||||
WriterBackend* backend = (*ld->factory)(frontend);
|
||||
assert(backend);
|
||||
|
||||
frontend->ty_name = ld->name;
|
||||
return backend;
|
||||
}
|
||||
|
||||
|
|
|
@ -80,18 +80,22 @@ const char* BasicThread::Fmt(const char* format, ...)
|
|||
|
||||
void BasicThread::Start()
|
||||
{
|
||||
|
||||
if ( started )
|
||||
return;
|
||||
|
||||
if ( pthread_mutex_init(&terminate, 0) != 0 )
|
||||
reporter->FatalError("Cannot create terminate mutex for thread %s", name.c_str());
|
||||
int err = pthread_mutex_init(&terminate, 0);
|
||||
if ( err != 0 )
|
||||
reporter->FatalError("Cannot create terminate mutex for thread %s:%s", name.c_str(), strerror(err));
|
||||
|
||||
// We use this like a binary semaphore and acquire it immediately.
|
||||
if ( pthread_mutex_lock(&terminate) != 0 )
|
||||
reporter->FatalError("Cannot aquire terminate mutex for thread %s", name.c_str());
|
||||
err = pthread_mutex_lock(&terminate);
|
||||
if ( err != 0 )
|
||||
reporter->FatalError("Cannot aquire terminate mutex for thread %s:%s", name.c_str(), strerror(err));
|
||||
|
||||
if ( pthread_create(&pthread, 0, BasicThread::launcher, this) != 0 )
|
||||
reporter->FatalError("Cannot create thread %s", name.c_str());
|
||||
err = pthread_create(&pthread, 0, BasicThread::launcher, this);
|
||||
if ( err != 0 )
|
||||
reporter->FatalError("Cannot create thread %s:%s", name.c_str(), strerror(err));
|
||||
|
||||
DBG_LOG(DBG_THREADING, "Started thread %s", name.c_str());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue