summaryrefslogtreecommitdiff
path: root/epan/proto.c
diff options
context:
space:
mode:
authorJakub Zawadzki <darkjames-ws@darkjames.pl>2013-11-10 16:04:15 +0000
committerJakub Zawadzki <darkjames-ws@darkjames.pl>2013-11-10 16:04:15 +0000
commit6f6d04e2f9585f603e713198938197821328c1b5 (patch)
treeab39bd2c315e65f18ab951d09a5080d2bc6a2561 /epan/proto.c
parentae59b09443706587aa78eefe6eb2f43da7815902 (diff)
downloadwireshark-6f6d04e2f9585f603e713198938197821328c1b5.tar.gz
Move REPORT_DISSECTOR_BUG() body to proto_report_dissector_bug() function. Remove exceptions.h include from proto.h
svn path=/trunk/; revision=53231
Diffstat (limited to 'epan/proto.c')
-rw-r--r--epan/proto.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/epan/proto.c b/epan/proto.c
index 0692af086f..d150b01cda 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -36,6 +36,7 @@
#include <ftypes/ftypes-int.h>
#include "packet.h"
+#include "exceptions.h"
#include "ptvcursor.h"
#include "strutil.h"
#include "addr_resolv.h"
@@ -1050,6 +1051,14 @@ proto_tree_add_debug_text(proto_tree *tree, const char *format, ...)
return pi;
}
+void proto_report_dissector_bug(const char *message)
+{
+ if (getenv("WIRESHARK_ABORT_ON_DISSECTOR_BUG") != NULL)
+ abort();
+ else
+ THROW_MESSAGE(DissectorError, message);
+}
+
/* We could probably get away with changing is_error to a minimum length value. */
static void
report_type_length_mismatch(proto_tree *tree, const gchar *descr, int length, gboolean is_error) {