Wireshark-commits: [Wireshark-commits] master-3.0 8b020e1: wsutil: Refactor WIN32 ws_pipe_wait_for_

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Mon, 02 Dec 2019 19:21:20 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=8b020e157a3feddfa9bcb48c3758b2cd1c74dc21
Submitter: "Tomasz Moń <desowin@xxxxxxxxx>"
Changed: branch: master-3.0
Repository: wireshark

Commits:

8b020e1 by Tomasz Moń (desowin@xxxxxxxxx):

    wsutil: Refactor WIN32 ws_pipe_wait_for_pipe()
    
    The ws_pipe_wait_for_pipe() implementation had multiple issues:
      * Use auto-reset events with ConnectNamedPipe (should be manual-reset)
      * Leaking event handles
      * Not checking return value from CreateEvent()
      * Waiting on closed handles
    
    This change fixes all the above mentioned issues.
    
    Bug: 15696
    Change-Id: Ia0c389a902655f85eccb0c59288b4a7d49da48c9
    Reviewed-on: https://code.wireshark.org/review/32896
    Petri-Dish: Guy Harris <guy@xxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Tomasz Moń <desowin@xxxxxxxxx>
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    (cherry picked from commit a051d5d869e1932a718eb43bc2089e88cadd30e3)
    Reviewed-on: https://code.wireshark.org/review/35289
    Petri-Dish: Stig Bjørlykke <stig@xxxxxxxxxxxxx>
    

Actions performed:

    from  7901451   wsutil: Warn on empty arguments
     add  8b020e1   wsutil: Refactor WIN32 ws_pipe_wait_for_pipe()


Summary of changes:
 wsutil/ws_pipe.c | 129 ++++++++++++++++++++++++++++++++-----------------------
 1 file changed, 75 insertions(+), 54 deletions(-)