mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
A few more small tweaks.
This commit is contained in:
parent
1459216b20
commit
8220d70e88
4 changed files with 6 additions and 8 deletions
|
@ -19,10 +19,8 @@ file_analysis::Analyzer* DataEvent::Instantiate(RecordVal* args, File* file)
|
||||||
{
|
{
|
||||||
using BifType::Record::FileAnalysis::AnalyzerArgs;
|
using BifType::Record::FileAnalysis::AnalyzerArgs;
|
||||||
|
|
||||||
const char* chunk_field = "chunk_event";
|
int chunk_off = AnalyzerArgs->FieldOffset("chunk_event");
|
||||||
const char* stream_field = "stream_event";
|
int stream_off = AnalyzerArgs->FieldOffset("stream_event");
|
||||||
int chunk_off = AnalyzerArgs->FieldOffset(chunk_field);
|
|
||||||
int stream_off = AnalyzerArgs->FieldOffset(stream_field);
|
|
||||||
|
|
||||||
Val* chunk_val = args->Lookup(chunk_off);
|
Val* chunk_val = args->Lookup(chunk_off);
|
||||||
Val* stream_val = args->Lookup(stream_off);
|
Val* stream_val = args->Lookup(stream_off);
|
||||||
|
|
|
@ -30,8 +30,7 @@ Extract::~Extract()
|
||||||
file_analysis::Analyzer* Extract::Instantiate(RecordVal* args, File* file)
|
file_analysis::Analyzer* Extract::Instantiate(RecordVal* args, File* file)
|
||||||
{
|
{
|
||||||
using BifType::Record::FileAnalysis::AnalyzerArgs;
|
using BifType::Record::FileAnalysis::AnalyzerArgs;
|
||||||
const char* field = "extract_filename";
|
Val* v = args->Lookup(AnalyzerArgs->FieldOffset("extract_filename"));
|
||||||
Val* v = args->Lookup(AnalyzerArgs->FieldOffset(field));
|
|
||||||
|
|
||||||
if ( ! v )
|
if ( ! v )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -325,7 +325,8 @@ void Manager::GetFileHandle(AnalyzerTag::Tag tag, Connection* c, bool is_orig)
|
||||||
{
|
{
|
||||||
current_handle.clear();
|
current_handle.clear();
|
||||||
|
|
||||||
if ( ! get_file_handle ) return;
|
if ( ! get_file_handle )
|
||||||
|
return;
|
||||||
|
|
||||||
val_list* vl = new val_list();
|
val_list* vl = new val_list();
|
||||||
vl->append(new Val(tag, TYPE_COUNT));
|
vl->append(new Val(tag, TYPE_COUNT));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue