From 553b1e0215ad5826906aafbe0e38c1e44cf9e1c3 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Mon, 12 Jun 2017 16:21:29 +0200 Subject: Do not process UI events while reading from live capture For at least Qt, the main_window_update callback is not necessary to make the stop button work. When restarting a live capture during a flood (via Ctrl-R), this callback actually results in an infinite loop in MainWindow::captureStop since the capture state never changes from FILE_READ_IN_PROGRESS. Remove this callback to ensure that the problematic pipeActivated / sync_pipe_input_cb / capture_input_new_packets / main_window_update / ... / on_actionCaptureRestart_triggered / testCaptureFileClose / captureStop sequence is avoided. Even though captureStop invokes capture_stop, I guess that this does not change the state because the pipeActivated callback is already active. Bug: 10917 Change-Id: I6ca4fa946963928b7bc8a53ca14f9a9a3a35eaa7 Reviewed-on: https://code.wireshark.org/review/22097 Reviewed-by: Jaap Keuter Reviewed-by: Peter Wu --- ui/capture.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'ui') diff --git a/ui/capture.c b/ui/capture.c index f0615e82fa..67282f70a3 100644 --- a/ui/capture.c +++ b/ui/capture.c @@ -396,12 +396,6 @@ capture_input_new_packets(capture_session *cap_session, int to_read) capture_callback_invoke(capture_cb_capture_fixed_continue, cap_session); } - /* update the main window so we get events (e.g. from the stop toolbar button) */ - /* This causes a hang on Windows (see bug 7305). Do we need this on any platform? */ -#ifndef _WIN32 - main_window_update(); -#endif - if(capture_opts->show_info) capture_info_new_packets(to_read, cap_session->cap_data_info); } -- cgit v1.2.1