mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
Migrate table-based for-loops to key-value iteration
This commit is contained in:
parent
41c7b229d3
commit
01d303b480
36 changed files with 150 additions and 153 deletions
|
@ -149,13 +149,13 @@ function flush_pending(c: connection)
|
|||
# Flush all pending but incomplete request/response pairs.
|
||||
if ( c?$sip_state )
|
||||
{
|
||||
for ( r in c$sip_state$pending )
|
||||
for ( r, info in c$sip_state$pending )
|
||||
{
|
||||
# We don't use pending elements at index 0.
|
||||
if ( r == 0 )
|
||||
next;
|
||||
|
||||
Log::write(SIP::LOG, c$sip_state$pending[r]);
|
||||
Log::write(SIP::LOG, info);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -293,9 +293,9 @@ event connection_state_remove(c: connection) &priority=-5
|
|||
{
|
||||
if ( c?$sip_state )
|
||||
{
|
||||
for ( r in c$sip_state$pending )
|
||||
for ( r, info in c$sip_state$pending )
|
||||
{
|
||||
Log::write(SIP::LOG, c$sip_state$pending[r]);
|
||||
Log::write(SIP::LOG, info);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue