Show internal errors with REPORT_DISSECTOR_BUG().
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 13 Oct 2005 02:21:01 +0000 (02:21 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 13 Oct 2005 02:21:01 +0000 (02:21 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16208 f5534014-38df-0310-8fa8-9805f1628bb7

asn1/acse/packet-acse-template.c
epan/dissectors/packet-acse.c

index c4052795da2c8701a88ccd9d5ec0a8499c4071a5..14ba0cd42873931caf28984cde1b849165d5b694 100644 (file)
@@ -166,16 +166,15 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
        /* do we have spdu type from the session dissector?  */
        if( !pinfo->private_data ){
                if(parent_tree){
-                       proto_tree_add_text(parent_tree, tvb, offset, -1,
-                               "Internal error:can't get spdu type from session dissector.");
+                       REPORT_DISSECTOR_BUG("Can't get SPDU type from session dissector.");
                } 
                return  ;
        } else {
                session  = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) );
                if(session->spdu_type == 0 ) {
                        if(parent_tree){
-                               proto_tree_add_text(parent_tree, tvb, offset, -1,
-                                       "Internal error:wrong spdu type %x from session dissector.",session->spdu_type);
+                               REPORT_DISSECTOR_BUG(
+                                       ep_strdup_printf("Wrong spdu type %x from session dissector.",session->spdu_type));
                                return  ;
                        }
                }
index 5905d57ca1edd397213500ff9d8bbdb1fcb2d130..9593d05927dcc9eebaf1f9dc9cf521104733f4f7 100644 (file)
@@ -1865,16 +1865,15 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
        /* do we have spdu type from the session dissector?  */
        if( !pinfo->private_data ){
                if(parent_tree){
-                       proto_tree_add_text(parent_tree, tvb, offset, -1,
-                               "Internal error:can't get spdu type from session dissector.");
+                       REPORT_DISSECTOR_BUG("Can't get SPDU type from session dissector.");
                } 
                return  ;
        } else {
                session  = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) );
                if(session->spdu_type == 0 ) {
                        if(parent_tree){
-                               proto_tree_add_text(parent_tree, tvb, offset, -1,
-                                       "Internal error:wrong spdu type %x from session dissector.",session->spdu_type);
+                               REPORT_DISSECTOR_BUG(
+                                       ep_strdup_printf("Wrong spdu type %x from session dissector.",session->spdu_type));
                                return  ;
                        }
                }