mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 17:18:20 +00:00
event from c++ to script works (at last...)
This commit is contained in:
parent
f8be3519c7
commit
9c8b0dec3b
8 changed files with 33 additions and 16 deletions
|
@ -1,7 +1,7 @@
|
|||
|
||||
#include "InputReader.h"
|
||||
#include "EventRegistry.h"
|
||||
#include "Event.h"
|
||||
// #include "EventRegistry.h"
|
||||
// #include "Event.h"
|
||||
|
||||
InputReader::InputReader()
|
||||
{
|
||||
|
@ -19,13 +19,16 @@ void InputReader::Error(const char *msg)
|
|||
}
|
||||
|
||||
bool InputReader::Init(string source, string eventName) {
|
||||
EventHandler* handler = event_registry->Lookup(eventName.c_str());
|
||||
//EventHandler* handler = event_registry->Lookup(eventName.c_str());
|
||||
|
||||
//if ( handler == 0 ) {
|
||||
// reporter->Error("Event %s not found", eventName.c_str());
|
||||
// return false;
|
||||
//}
|
||||
|
||||
if ( handler == 0 ) {
|
||||
reporter->Error("Event %s not found", eventName.c_str());
|
||||
return false;
|
||||
}
|
||||
//val_list* vl = new val_list;
|
||||
//vl->append(new Val(12, TYPE_COUNT));
|
||||
|
||||
mgr.Dispatch(new Event(handler, 0));
|
||||
//mgr.Dispatch(new Event(handler, vl));
|
||||
return true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue