Improve Display filtering performance

This commit is contained in:
Kaian 2015-02-27 22:08:32 +01:00
parent 3c120844f4
commit ddfba158d4
3 changed files with 19 additions and 13 deletions

View File

@ -16,8 +16,8 @@
# set syntax.branch on
##-----------------------------------------------------------------------------
## Uncomment to configure packet count capture limit (0: disabled)
# set capture.limit 2000
## Uncomment to configure packet count capture limit (can't be disabled)
# set capture.limit 100000
## Default capture keyfile for TLS transport
# set capture.keyfile /etc/ssl/key.pem

View File

@ -91,7 +91,7 @@ init_options()
set_option_value("sngrep.savepath", home);
// Set default capture options
set_option_value("capture.limit", "10000");
set_option_value("capture.limit", "100000");
set_option_value("capture.device", "any");
set_option_value("capture.lookup", "off");

View File

@ -792,7 +792,12 @@ call_list_add_column(PANEL *panel, enum sip_attr_id id, const char* attr, const
void
call_list_filter_update(PANEL *panel)
{
// TODO
sip_call_t *call = NULL;
// Force filter evaluation
while((call = call_get_next(call)))
call->filtered = -1;
// Clear list
call_list_clear(panel);
}
@ -841,12 +846,13 @@ call_list_get_next(PANEL *panel, sip_call_t *cur)
next->filtered = 1;
continue;
}
// This call doesnt match display
if (!call_list_match_dfilter(panel, next)) {
next->filtered = 1;
continue;
}
}
// This call doesnt match display
if (!call_list_match_dfilter(panel, next))
continue;
return next;
}
return NULL;
@ -868,12 +874,12 @@ call_list_get_prev(PANEL *panel, sip_call_t *cur)
prev->filtered = 1;
continue;
}
// This call doesnt match display
if (!call_list_match_dfilter(panel, prev)) {
prev->filtered = 1;
continue;
}
}
// This call doesnt match display
if (!call_list_match_dfilter(panel, prev))
continue;
return prev;
}
return NULL;