mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
Remove value serialization.
Note - this compiles, but you cannot run Bro anymore - it crashes immediately with a 0-pointer access. The reason behind it is that the required clone functionality does not work anymore.
This commit is contained in:
parent
9b49c7cbc6
commit
474efe9e69
78 changed files with 58 additions and 9185 deletions
36
src/Timer.cc
36
src/Timer.cc
|
@ -5,7 +5,6 @@
|
|||
#include "util.h"
|
||||
#include "Timer.h"
|
||||
#include "Desc.h"
|
||||
#include "Serializer.h"
|
||||
#include "broker/Manager.h"
|
||||
|
||||
// Names of timers in same order than in TimerType.
|
||||
|
@ -53,41 +52,6 @@ void Timer::Describe(ODesc* d) const
|
|||
d->Add(Time());
|
||||
}
|
||||
|
||||
bool Timer::Serialize(SerialInfo* info) const
|
||||
{
|
||||
return SerialObj::Serialize(info);
|
||||
}
|
||||
|
||||
Timer* Timer::Unserialize(UnserialInfo* info)
|
||||
{
|
||||
Timer* timer = (Timer*) SerialObj::Unserialize(info, SER_TIMER);
|
||||
if ( ! timer )
|
||||
return 0;
|
||||
|
||||
timer_mgr->Add(timer);
|
||||
|
||||
return timer;
|
||||
}
|
||||
|
||||
bool Timer::DoSerialize(SerialInfo* info) const
|
||||
{
|
||||
DO_SERIALIZE(SER_TIMER, SerialObj);
|
||||
char tmp = type;
|
||||
return SERIALIZE(tmp) && SERIALIZE(time);
|
||||
}
|
||||
|
||||
bool Timer::DoUnserialize(UnserialInfo* info)
|
||||
{
|
||||
DO_UNSERIALIZE(SerialObj);
|
||||
|
||||
char tmp;
|
||||
if ( ! UNSERIALIZE(&tmp) )
|
||||
return false;
|
||||
type = tmp;
|
||||
|
||||
return UNSERIALIZE(&time);
|
||||
}
|
||||
|
||||
unsigned int TimerMgr::current_timers[NUM_TIMER_TYPES];
|
||||
|
||||
TimerMgr::~TimerMgr()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue