Wireshark-commits: [Wireshark-commits] master-2.2 54bf645: extcap: Use stderr to print error messag

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Thu, 4 Aug 2016 16:48:19 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=54bf645a206bfefdbfb0c5ba2c7270b990f9179b
Submitter: Roland Knall (rknall@xxxxxxxxx)
Changed: branch: master-2.2
Repository: wireshark

Commits:

54bf645 by Roland Knall (roland.knall@xxxxxxxxxxxxxxxxx):

    extcap: Use stderr to print error message
    
    This patch reads out the stderr messages from an extcap
    utility and displays it to an user. It was tested on Qt
    but not on GTK, but should work their as well.
    
    On Mac OS/X and Windows the child_watch does not behave
    as it was intended. Therefore in extcap_cleanup, the callbacks
    are called manually, if and only if, they have not been
    called already.
    
    The reason why it displays two error messages is, that
    by the time the first one is being displayed, glib has not
    returned from the spawned process on Linux yet. So there
    is no way to add the stderr correctly, and putting a handler
    to stderr into interface_opts will lead to memory errors,
    cause then the code tries to access memory outside of its
    protection.
    
    This is a combination of the following commits, where 12954 was
    the main commit:
    
     - Change: 12954 - extcap: Use stderr to print error message
     - Change: 16827 - extcap: Remove g_spawn_check_exit_status
     - Change: 16831 - extcap: extend buffer (CID 1364684)
    
    Bug: 11892
    Reviewed-on: https://code.wireshark.org/review/12954
    Reviewed-by: Roland Knall <rknall@xxxxxxxxx>
    Petri-Dish: Roland Knall <rknall@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
    Reviewed-by: Dario Lombardo <lomato@xxxxxxxxx>
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    (cherry picked from commit c611eded2272ac79997fb3ce11f2339dc32b53cb)
    
    Change-Id: Ic3ba03543cfbd1e9a196764b435e78aca218e1ad
    Reviewed-on: https://code.wireshark.org/review/16876
    Petri-Dish: Roland Knall <rknall@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
    Reviewed-by: Roland Knall <rknall@xxxxxxxxx>
    

Actions performed:

    from  d5780aa   openSAFETY: Remove SCM UDID check
    adds  54bf645   extcap: Use stderr to print error message


Summary of changes:
 capchild/capture_sync.c |    2 +-
 capture_opts.c          |    2 +
 doc/extcap_example.py   |   74 ++++++++++++++++++++++--
 dumpcap.c               |   28 ++++++++--
 extcap.c                |  142 ++++++++++++++++++++++++++++++++++++++++++++---
 extcap.h                |    4 +-
 extcap_spawn.c          |   14 ++---
 extcap_spawn.h          |    2 +-
 8 files changed, 237 insertions(+), 31 deletions(-)