mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath: Change Input::update_finished lookup to happen at init time. Fix format specifier on RemoteSerializer::Connect.
This commit is contained in:
commit
36de4bf3f3
3 changed files with 6 additions and 6 deletions
|
@ -700,7 +700,8 @@ RemoteSerializer::PeerID RemoteSerializer::Connect(const IPAddr& ip,
|
|||
|
||||
const size_t BUFSIZE = 1024;
|
||||
char* data = new char[BUFSIZE];
|
||||
snprintf(data, BUFSIZE, "%"PRIu64",%s,%s,%"PRIu16",%"PRIu32",%d", p->id,
|
||||
snprintf(data, BUFSIZE,
|
||||
"%"PRI_PTR_COMPAT_UINT",%s,%s,%"PRIu16",%"PRIu32",%d", p->id,
|
||||
ip.AsString().c_str(), zone_id.c_str(), port, uint32(retry),
|
||||
use_ssl);
|
||||
|
||||
|
|
|
@ -194,6 +194,7 @@ Manager::TableStream::~TableStream()
|
|||
|
||||
Manager::Manager()
|
||||
{
|
||||
update_finished = internal_handler("Input::update_finished");
|
||||
}
|
||||
|
||||
Manager::~Manager()
|
||||
|
@ -1199,11 +1200,7 @@ void Manager::EndCurrentSend(ReaderFrontend* reader)
|
|||
#endif
|
||||
|
||||
// Send event that the current update is indeed finished.
|
||||
EventHandler* handler = event_registry->Lookup("Input::update_finished");
|
||||
if ( handler == 0 )
|
||||
reporter->InternalError("Input::update_finished not found!");
|
||||
|
||||
SendEvent(handler, 2, new StringVal(i->name.c_str()), new StringVal(i->source.c_str()));
|
||||
SendEvent(update_finished, 2, new StringVal(i->name.c_str()), new StringVal(i->source.c_str()));
|
||||
}
|
||||
|
||||
void Manager::Put(ReaderFrontend* reader, Value* *vals)
|
||||
|
|
|
@ -184,6 +184,8 @@ private:
|
|||
enum StreamType { TABLE_STREAM, EVENT_STREAM };
|
||||
|
||||
map<ReaderFrontend*, Stream*> readers;
|
||||
|
||||
EventHandlerPtr update_finished;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue