mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00
Check file_over_new_connetion to fire for each connection (including the first).
This commit is contained in:
parent
df2841458d
commit
2b48396d23
1 changed files with 1 additions and 4 deletions
|
@ -116,11 +116,8 @@ void File::UpdateConnectionFields(Connection* conn)
|
||||||
|
|
||||||
Val* conns = val->Lookup(conns_idx);
|
Val* conns = val->Lookup(conns_idx);
|
||||||
|
|
||||||
bool is_first = false;
|
|
||||||
|
|
||||||
if ( ! conns )
|
if ( ! conns )
|
||||||
{
|
{
|
||||||
is_first = true;
|
|
||||||
conns = empty_connection_table();
|
conns = empty_connection_table();
|
||||||
val->Assign(conns_idx, conns);
|
val->Assign(conns_idx, conns);
|
||||||
}
|
}
|
||||||
|
@ -131,7 +128,7 @@ void File::UpdateConnectionFields(Connection* conn)
|
||||||
Val* conn_val = conn->BuildConnVal();
|
Val* conn_val = conn->BuildConnVal();
|
||||||
conns->AsTableVal()->Assign(idx, conn_val);
|
conns->AsTableVal()->Assign(idx, conn_val);
|
||||||
|
|
||||||
if ( ! is_first && FileEventAvailable(file_over_new_connection) )
|
if ( FileEventAvailable(file_over_new_connection) )
|
||||||
{
|
{
|
||||||
val_list* vl = new val_list();
|
val_list* vl = new val_list();
|
||||||
vl->append(val->Ref());
|
vl->append(val->Ref());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue