From 82d24d907ae07b2cb9a558ec12a1f0cb3c47e0cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Mo=C5=84?= Date: Fri, 19 Apr 2019 17:48:45 +0200 Subject: [PATCH] Qt: Fix deadlock in extcap toolbar creation Deadlock happened if extcap was writing to control pipe before it sent the pcap data and the pipe buffer was not able to hold all the data. The solution is to start reading data from extcap control pipe in capture prepare. This bug was introduced in 018f6bff18785a1c3971a1ccfe3b1b5243d4d154 which was reviewed on https://code.wireshark.org/review/23211 Unfortunately neither the commit message nor the review contains any explaination why it delays the extcap control pipe opening. Bug: 15261 Change-Id: I10d006128f6eb7d63f751d230edbd905eb46416b Reviewed-on: https://code.wireshark.org/review/32898 Reviewed-by: Anders Broman --- ui/qt/main_window_slots.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp index c3dac66d02..3489d7e65c 100644 --- a/ui/qt/main_window_slots.cpp +++ b/ui/qt/main_window_slots.cpp @@ -491,14 +491,14 @@ void MainWindow::queuedFilterAction(QString action_filter, FilterAction::Action // Capture callbacks #ifdef HAVE_LIBPCAP -void MainWindow::captureCapturePrepared(capture_session *) { +void MainWindow::captureCapturePrepared(capture_session *session) { setTitlebarForCaptureInProgress(); setWindowIcon(wsApp->captureIcon()); /* Disable menu items that make no sense if you're currently running a capture. */ - setForCaptureInProgress(true); + setForCaptureInProgress(true, session->capture_opts->ifaces); // set_capture_if_dialog_for_capture_in_progress(TRUE); // /* Don't set up main window for a capture file. */