aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2012-08-08 03:29:51 +0000
committerJeff Morriss <jeff.morriss.ws@gmail.com>2012-08-08 03:29:51 +0000
commit98a893986d5997a8f57877d45abd26e443c5da6c (patch)
tree3ae2da9b93d8226c3e50733435fa93cb1f7e1816 /tools
parent68aea944da0373941ab73ca38e7c9c77b85f4a3b (diff)
Use expert infos instead of g_warning when something unexpected is found.
svn path=/trunk/; revision=44324
Diffstat (limited to 'tools')
-rwxr-xr-xtools/wireshark_gen.py36
1 files changed, 25 insertions, 11 deletions
diff --git a/tools/wireshark_gen.py b/tools/wireshark_gen.py
index 58b0c6ec78..c0ec52d710 100755
--- a/tools/wireshark_gen.py
+++ b/tools/wireshark_gen.py
@@ -1688,10 +1688,13 @@ switch(header->message_type) {
"""
template_helper_switch_msgtype_default_start = """\
default:
+ {
+ proto_item *pi;
- /* Unknown GIOP Exception */
-
- g_warning("Unknown GIOP Message");
+ /* Unknown GIOP Message */
+ pi = proto_tree_add_text(tree, tvb, 0, 0, "Unknown GIOP message %d", header->message_type);
+ expert_add_info_format(pinfo, pi, PI_MALFORMED, PI_ERROR, "Unknown GIOP message %d", header->message_type);
+ }
"""
template_helper_switch_msgtype_default_end = """\
break;
@@ -1722,10 +1725,13 @@ break;
"""
template_helper_switch_msgtype_reply_default_start = """\
default:
+ {
+ proto_item *pi;
- /* Unknown Exception */
-
- g_warning("Unknown Exception ");
+ /* Unknown Exception */
+ pi = proto_tree_add_text(tree, tvb, 0, 0, "Unknown exception %d", header->rep_status);
+ expert_add_info_format(pinfo, pi, PI_MALFORMED, PI_ERROR, "Unknown exception %d", header->rep_status);
+ }
"""
template_helper_switch_msgtype_reply_default_end = """\
break;
@@ -1735,10 +1741,13 @@ break;
"""
template_helper_switch_msgtype_default_start = """\
default:
+ {
+ proto_item *pi;
- /* Unknown GIOP Message */
-
- g_warning("Unknown GIOP Message");
+ /* Unknown GIOP Message */
+ pi = proto_tree_add_text(tree, tvb, 0, 0, "Unknown GIOP message %d", header->message_type);
+ expert_add_info_format(pinfo, pi, PI_MALFORMED, PI_ERROR, "Unknown GIOP message %d", header->message_type);
+ }
"""
template_helper_switch_msgtype_default_end = """\
break;
@@ -1748,10 +1757,14 @@ switch(header->rep_status) {
"""
template_helper_switch_rep_status_default_start = """\
default:
+ {
+ proto_item *pi;
- /* Unknown Reply Status */
+ /* Unknown Reply Status */
+ pi = proto_tree_add_text(tree, tvb, 0, 0, "Unknown reply status %d", header->rep_status);
+ expert_add_info_format(pinfo, pi, PI_MALFORMED, PI_ERROR, "Unknown reply status %d", header->rep_status);
+ }
- g_warning("Unknown Reply Status");
"""
template_helper_switch_rep_status_default_end = """\
break;
@@ -2001,6 +2014,7 @@ static int hf_operationrequest = -1;/* Request_Operation field */
#include <epan/packet.h>
#include <epan/proto.h>
#include <epan/dissectors/packet-giop.h>
+#include <epan/expert.h>
#ifdef _MSC_VER
/* disable warning: "unreference local variable" */