Wireshark-commits: [Wireshark-commits] master ca1163a: Qt: Add asynchronous simple dialog
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Mon, 20 May 2019 12:53:45 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=ca1163ab60d85ae625d406b30c6eb31937bd1a1d
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

ca1163a by Tomasz Moń (desowin@xxxxxxxxx):

    Qt: Add asynchronous simple dialog
    
    When extcap fails before connecting to pipes, ws_write() in
    InterfaceToolbar::controlSend() fails and error message is displayed to
    the user.
    
    Before this change, the message box would block until the user closes
    the message. As the controlSend() was called inside "capture prepared"
    context the remaining capture preparation code would wait for the user
    action. However, the pipeTimeout() would get called before user confirms
    the message as Qt would be processing all events in the main event
    queue. This led to "capture failed" executing before "capture prepared"
    finished. Such interruption caused multiple issues including freeing
    buffer that was not yet allocated.
    
    Bug: 15743
    Change-Id: I6bc2734126292cdc5b560418069caf98747be68e
    Reviewed-on: https://code.wireshark.org/review/33208
    Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
    Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Tomasz Moń <desowin@xxxxxxxxx>
    Petri-Dish: Alexis La Goutte <alexis.lagoutte@xxxxxxxxx>
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    

Actions performed:

    from  40f6cb7   extcap: Fix memory leak in extcap_get_if_configuration_values()
     add  ca1163a   Qt: Add asynchronous simple dialog


Summary of changes:
 ui/qt/interface_toolbar.cpp | 12 ++++++------
 ui/qt/simple_dialog.cpp     | 30 ++++++++++++++++++++++++++++++
 ui/qt/simple_dialog.h       |  1 +
 ui/simple_dialog.h          |  4 ++++
 4 files changed, 41 insertions(+), 6 deletions(-)