diff options
author | Bill Meier <wmeier@newsguy.com> | 2014-12-24 10:44:03 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2014-12-26 20:55:25 +0000 |
commit | b68fb9b659b0debd7286195f9ad194be998cc3ff (patch) | |
tree | 6567357b78b917f85d50fe1842f864b0dc904e99 /epan/dissectors/packet-giop.c | |
parent | 4cf6583b9e5bc7fa5d6f6ac17cdc1f634ae1567e (diff) |
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 <wmeier@newsguy.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-giop.c')
-rw-r--r-- | epan/dissectors/packet-giop.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/epan/dissectors/packet-giop.c b/epan/dissectors/packet-giop.c index 147eac7ddd..8012a5f7a6 100644 --- a/epan/dissectors/packet-giop.c +++ b/epan/dissectors/packet-giop.c @@ -287,13 +287,14 @@ #include <epan/prefs.h> #include <epan/expert.h> #include <epan/strutil.h> +#include <wsutil/file_util.h> +#include <wsutil/str_util.h> +#include <wsutil/pint.h> +#include <wsutil/report_err.h> #include "packet-giop.h" #include "packet-ziop.h" #include "packet-tcp.h" -#include <wsutil/file_util.h> -#include <wsutil/str_util.h> -#include <wsutil/pint.h> void proto_register_giop(void); void proto_reg_handoff_giop(void); @@ -1427,12 +1428,12 @@ static guint32 string_to_IOR(guchar *in, guint32 in_len, guint8 **out) { if ( g_ascii_isxdigit(in[i]) && g_ascii_isxdigit(in[i+1]) ) { /* hex ? */ if ( (tmpval_msb = ws_xton(in[i])) < 0 ) { - g_warning("giop: Invalid value in IOR %i \n", tmpval_msb); + report_failure("giop: Invalid value in IOR %i", tmpval_msb); } if ( (tmpval_lsb = ws_xton(in[i+1])) < 0 ) { - g_warning("giop: Invalid value in IOR %i \n", tmpval_lsb); + report_failure("giop: Invalid value in IOR %i", tmpval_lsb); } tmpval = tmpval_msb << 4; @@ -1488,7 +1489,7 @@ static void read_IOR_strings_from_file(const gchar *name, int max_iorlen) { if (fp == NULL) { if (errno == EACCES) - fprintf(stderr, "Error opening file %s for reading: %s\n", name, g_strerror(errno)); + report_open_failure(name, errno, FALSE); return; } |