mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
Merge remote-tracking branch 'origin/master' into topic/seth/log-framework-ext
This commit is contained in:
commit
a60ce35103
885 changed files with 141119 additions and 120109 deletions
|
@ -681,8 +681,6 @@ bool Manager::RemoveFilter(EnumVal* id, string name)
|
|||
|
||||
bool Manager::Write(EnumVal* id, RecordVal* columns)
|
||||
{
|
||||
bool error = false;
|
||||
|
||||
Stream* stream = FindStream(id);
|
||||
if ( ! stream )
|
||||
return false;
|
||||
|
@ -903,9 +901,6 @@ bool Manager::Write(EnumVal* id, RecordVal* columns)
|
|||
|
||||
Unref(columns);
|
||||
|
||||
if ( error )
|
||||
RemoveDisabledWriters(stream);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,11 +42,8 @@ public:
|
|||
/**
|
||||
* Returns false if the tag represents an error value rather than a
|
||||
* legal writer type.
|
||||
* TODO: make this conversion operator "explicit" (C++11) or use a
|
||||
* "safe bool" idiom (not necessary if "explicit" is available),
|
||||
* otherwise this may allow nonsense/undesired comparison operations.
|
||||
*/
|
||||
operator bool() const { return *this != Tag(); }
|
||||
explicit operator bool() const { return *this != Tag(); }
|
||||
|
||||
/**
|
||||
* Assignment operator.
|
||||
|
|
|
@ -38,7 +38,7 @@ public:
|
|||
* @param name A descriptive name for writer's type (e.g., \c Ascii).
|
||||
*
|
||||
*/
|
||||
WriterBackend(WriterFrontend* frontend);
|
||||
explicit WriterBackend(WriterFrontend* frontend);
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
|
@ -248,8 +248,12 @@ public:
|
|||
bool FinishedRotation();
|
||||
|
||||
// Overridden from MsgThread.
|
||||
virtual bool OnHeartbeat(double network_time, double current_time);
|
||||
virtual bool OnFinish(double network_time);
|
||||
bool OnHeartbeat(double network_time, double current_time) override;
|
||||
bool OnFinish(double network_time) override;
|
||||
|
||||
// Let the compiler know that we are aware that there is a virtual
|
||||
// info function in the base.
|
||||
using MsgThread::Info;
|
||||
|
||||
protected:
|
||||
friend class FinishMessage;
|
||||
|
|
|
@ -120,6 +120,10 @@ bool SQLite::DoInit(const WriterInfo& info, int arg_num_fields,
|
|||
return false;
|
||||
}
|
||||
|
||||
// Allow connections to same DB to use single data/schema cache. Also
|
||||
// allows simultaneous writes to one file.
|
||||
sqlite3_enable_shared_cache(1);
|
||||
|
||||
num_fields = arg_num_fields;
|
||||
fields = arg_fields;
|
||||
|
||||
|
@ -232,21 +236,6 @@ bool SQLite::DoInit(const WriterInfo& info, int arg_num_fields,
|
|||
return true;
|
||||
}
|
||||
|
||||
// Format String
|
||||
char* SQLite::FS(const char* format, ...)
|
||||
{
|
||||
char* buf;
|
||||
|
||||
va_list al;
|
||||
va_start(al, format);
|
||||
int n = vasprintf(&buf, format, al);
|
||||
va_end(al);
|
||||
|
||||
assert(n >= 0);
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
int SQLite::AddParams(Value* val, int pos)
|
||||
{
|
||||
if ( ! val->present )
|
||||
|
|
|
@ -38,7 +38,6 @@ private:
|
|||
|
||||
int AddParams(threading::Value* val, int pos);
|
||||
string GetTableType(int, int);
|
||||
char* FS(const char* format, ...);
|
||||
|
||||
const threading::Field* const * fields; // raw mapping
|
||||
unsigned int num_fields;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue