Wireshark-commits: [Wireshark-commits] master c611ede: extcap: Use stderr to print error message
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sat, 30 Jul 2016 21:16:05 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=c611eded2272ac79997fb3ce11f2339dc32b53cb
Submitter: Anders Broman (a.broman58@xxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

c611ede 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.
    
    Bug: 11892
    Change-Id: I2db60dd480fed3e01428b91a705057e4f088bd15
    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>
    

Actions performed:

    from  c2ac9c5   Use correct relative path.
    adds  c611ede   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               |   25 +++++++--
 extcap.c                |  139 ++++++++++++++++++++++++++++++++++++++++++++---
 extcap.h                |    4 +-
 extcap_spawn.c          |   14 ++---
 extcap_spawn.h          |    2 +-
 8 files changed, 231 insertions(+), 31 deletions(-)