mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 01:28:20 +00:00
well, it compiles. and perhaps it sends an event. billiant.
This commit is contained in:
parent
0eafeb0369
commit
f8be3519c7
5 changed files with 63 additions and 7 deletions
|
@ -1,5 +1,7 @@
|
|||
|
||||
#include "InputReader.h"
|
||||
#include "EventRegistry.h"
|
||||
#include "Event.h"
|
||||
|
||||
InputReader::InputReader()
|
||||
{
|
||||
|
@ -9,4 +11,21 @@ InputReader::InputReader()
|
|||
InputReader::~InputReader()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void InputReader::Error(const char *msg)
|
||||
{
|
||||
input_mgr->Error(this, msg);
|
||||
}
|
||||
|
||||
bool InputReader::Init(string source, string eventName) {
|
||||
EventHandler* handler = event_registry->Lookup(eventName.c_str());
|
||||
|
||||
if ( handler == 0 ) {
|
||||
reporter->Error("Event %s not found", eventName.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
mgr.Dispatch(new Event(handler, 0));
|
||||
return true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue