forked from osmocom/wireshark
Falcodump: More scap event code handling fixes
We don't need to do anything special for timeouts.
This commit is contained in:
parent
de16040021
commit
11983087ed
|
@ -961,22 +961,12 @@ int main(int argc, char **argv)
|
|||
goto end;
|
||||
}
|
||||
sinsp_evt *evt;
|
||||
#define FALCODUMP_SCAP_EVENT_TIMEOUT 5 // seconds; arbitrary
|
||||
GTimer *event_timer = g_timer_new();
|
||||
ws_noisy("Starting capture loop.");
|
||||
while (!extcap_end_application) {
|
||||
try {
|
||||
int32_t res = inspector.next(&evt);
|
||||
switch (res) {
|
||||
case SCAP_TIMEOUT:
|
||||
{
|
||||
double elapsed = g_timer_elapsed(event_timer, NULL);
|
||||
if (elapsed > FALCODUMP_SCAP_EVENT_TIMEOUT) {
|
||||
ws_warning("Inspector timed out after %0.1f seconds", elapsed);
|
||||
extcap_end_application = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SCAP_FILTERED_EVENT:
|
||||
break;
|
||||
case SCAP_SUCCESS:
|
||||
|
|
Loading…
Reference in New Issue