Wireshark-commits: [Wireshark-commits] master 2c44a7f: Clean up handling of enabled/disabled protoc

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sat, 8 Apr 2017 20:40:38 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=2c44a7f930967335b442e899c17e1eb46831e3c1
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

2c44a7f by Guy Harris (guy@xxxxxxxxxxxx):

    Clean up handling of enabled/disabled protocols/heuristic dissectors.
    
    Add a "report a warning message" routine to the "report_err" code in
    libwsutil, and rename files and routines appropriately, as they don't
    only handle errors any more.
    
    Have a routine read_enabled_and_disabled_protos() that reads all the
    files that enable or disable protocols or heuristic dissectors, enables
    and disables them based on the contents of those files, and reports
    errors itself (as warnings) using the new "report a warning message"
    routine.  Fix that error reporting to report separately on the disabled
    protocols, enabled protocols, and heuristic dissectors files.
    
    Have a routine to set up the enabled and disabled protocols and
    heuristic dissectors from the command-line arguments, so it's done the
    same way in all programs.
    
    If we try to enable or disable an unknown heuristic dissector via a
    command-line argument, report an error.
    
    Update a bunch of comments.
    
    Update the name of disabled_protos_cleanup(), as it cleans up
    information for disabled *and* enabled protocols and for heuristic
    dissectors.
    
    Support the command-line flags to enable and disable protocols and
    heuristic dissectors in tfshark.
    
    Change-Id: I9b8bd29947cccdf6dc34a0540b5509ef941391df
    Reviewed-on: https://code.wireshark.org/review/20966
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  f1751ef   checkhf: handle C++-style comments
    adds  2c44a7f   Clean up handling of enabled/disabled protocols/heuristic dissectors.


Summary of changes:
 capchild/capture_sync.c                   |    2 +-
 capinfos.c                                |   10 +-
 captype.c                                 |   10 +-
 dftest.c                                  |   14 +-
 editcap.c                                 |   12 +-
 epan/addr_resolv.c                        |    2 +-
 epan/disabled_protos.c                    |  231 +++++++++++++++++++----------
 epan/disabled_protos.h                    |   81 ++--------
 epan/dissectors/packet-diameter.c         |    2 +-
 epan/dissectors/packet-etch.c             |    2 +-
 epan/dissectors/packet-giop.c             |    2 +-
 epan/dissectors/packet-radius.c           |    2 +-
 epan/dissectors/packet-smb-sidsnooping.c  |    2 +-
 epan/dissectors/packet-snort.c            |    2 +-
 epan/dissectors/packet-ssl-utils.c        |    2 +-
 epan/dissectors/packet-tpncp.c            |    2 +-
 epan/dissectors/packet-uasip.c            |    2 +-
 epan/dissectors/packet-uaudp.c            |    2 +-
 epan/dissectors/packet-xml.c              |    2 +-
 epan/epan.c                               |    4 +-
 epan/geoip_db.c                           |    2 +-
 epan/oids.c                               |    2 +-
 epan/proto.c                              |    2 +-
 epan/proto.h                              |    9 +-
 epan/uat.c                                |    2 +-
 epan/wslua/wslua.h                        |    2 +-
 mergecap.c                                |   10 +-
 plugins/mate/mate.h                       |    2 +-
 plugins/transum/packet-transum.c          |    2 +-
 plugins/wimaxasncp/packet-wimaxasncp.c    |    2 +-
 randpkt.c                                 |   12 +-
 rawshark.c                                |   84 ++++-------
 reordercap.c                              |   10 +-
 sharkd.c                                  |   87 ++++-------
 tfshark.c                                 |   82 ++++------
 tshark.c                                  |  107 ++++---------
 ui/alert_box.c                            |    6 +
 ui/alert_box.h                            |    5 +
 ui/cli/tap-stats_tree.c                   |    2 +-
 ui/dissect_opts.c                         |   44 ++++++
 ui/dissect_opts.h                         |   10 ++
 ui/gtk/compare_stat.c                     |    2 +-
 ui/gtk/main.c                             |  119 ++++-----------
 ui/gtk/rtp_player.c                       |    2 +-
 ui/gtk/simple_dialog.c                    |    9 ++
 ui/gtk/stats_tree_stat.c                  |    2 +-
 ui/gtk/uat_gui.c                          |    2 +-
 ui/qt/main_window.cpp                     |   16 ++
 ui/qt/main_window_slots.cpp               |    3 +-
 ui/qt/uat_dialog.cpp                      |    2 +-
 ui/qt/wireshark_application.cpp           |   62 ++------
 ui/qt/wireshark_application.h             |    2 +-
 ui/simple_dialog.h                        |    5 +
 wireshark-qt.cpp                          |   55 ++-----
 wsutil/CMakeLists.txt                     |    2 +-
 wsutil/Makefile.am                        |    4 +-
 wsutil/filesystem.c                       |    2 +-
 wsutil/plugins.c                          |    2 +-
 wsutil/report_err.c                       |  108 --------------
 wsutil/report_message.c                   |  125 ++++++++++++++++
 wsutil/{report_err.h => report_message.h} |   25 ++--
 61 files changed, 654 insertions(+), 767 deletions(-)
 delete mode 100644 wsutil/report_err.c
 create mode 100644 wsutil/report_message.c
 rename wsutil/{report_err.h => report_message.h} (78%)