From b68fb9b659b0debd7286195f9ad194be998cc3ff Mon Sep 17 00:00:00 2001 From: Bill Meier Date: Wed, 24 Dec 2014 10:44:03 -0500 Subject: Fix some dissectors doing termio (fprintf(stderr,..), g_warning()). - Use report_...failure() (in most cases). - Also: Do some misc fixes in certain disectors - re-arrange order of #includes - Fixup preferences help text Change-Id: I385f6f97257f365f53ce611df02f57f9257dc5f9 Reviewed-on: https://code.wireshark.org/review/6039 Petri-Dish: Bill Meier Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- epan/dissectors/packet-tpncp.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'epan/dissectors/packet-tpncp.c') diff --git a/epan/dissectors/packet-tpncp.c b/epan/dissectors/packet-tpncp.c index 0b1a43319a..ce4018cf3a 100644 --- a/epan/dissectors/packet-tpncp.c +++ b/epan/dissectors/packet-tpncp.c @@ -35,6 +35,7 @@ #include #include #include +#include #include "packet-tcp.h" /*-------------------------------------------------------------------------------------------------------------------------------------------*/ @@ -805,7 +806,7 @@ void proto_register_tpncp(void) { "TPNCP", "tpncp"); if(global_tpncp_load_db){ if (init_tpncp_db() == -1) { - g_warning("Could not load tpncp.dat file, tpncp dissector will not work"); + report_failure("tpncp: Could not load tpncp.dat file, tpncp dissector will not work"); return; } @@ -826,7 +827,7 @@ void proto_register_tpncp(void) { } CATCH_ALL { - g_warning("Corrupt tpncp.dat file, tpncp dissector will not work."); + report_failure("Corrupt tpncp.dat file, tpncp dissector will not work."); } ENDTRY; @@ -840,11 +841,11 @@ void proto_register_tpncp(void) { /* See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9569 for some discussion on this as well */ prefs_register_bool_preference(tpncp_module, "load_db", - "Whether to load DB or not, if DB not loaded dissector is passive", - "Whether to load the Data base or not, not loading the DB " - "dissaables the protocol, Wireshar has to be restarted for the" - "setting to take effect ", - &global_tpncp_load_db); + "Whether to load DB or not; if DB not loaded dissector is passive", + "Whether to load the Database or not; not loading the DB" + " disables the protocol; Wireshark has to be restarted for the" + " setting to take effect.", + &global_tpncp_load_db); prefs_register_uint_preference(tpncp_module, "tcp.trunkpack_port", "TPNCP \"well-known\" TrunkPack TCP Port", -- cgit v1.2.3