aboutsummaryrefslogtreecommitdiffstats
path: root/epan/expert.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-08-05 02:25:45 +0000
committerMichael Mann <mmann78@netscape.net>2013-08-05 02:25:45 +0000
commit81f3faf1e8cc1f520f488897771e003109c2a71d (patch)
treeef6b935607b5b7a4fc60811af6c40acbce81861d /epan/expert.c
parent327f461190b5323bea322b080c6b592296bd6449 (diff)
Completely remove support for proto_item_set_expert_flags.
svn path=/trunk/; revision=51144
Diffstat (limited to 'epan/expert.c')
-rw-r--r--epan/expert.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/epan/expert.c b/epan/expert.c
index f4399e7939..c46260247a 100644
--- a/epan/expert.c
+++ b/epan/expert.c
@@ -229,17 +229,25 @@ expert_register_field_array(expert_module_t* module, ei_register_info *exp, cons
}
}
+/** clear flags according to the mask and set new flag values */
+#define FI_REPLACE_FLAGS(fi, mask, flags_in) { \
+ (fi->flags = (fi)->flags & ~(mask)); \
+ (fi->flags = (fi)->flags | (flags_in)); \
+}
/* set's the PI_ flags to a protocol item
* (and its parent items till the toplevel) */
static void
-expert_set_item_flags(proto_item *pi, int group, int severity)
+expert_set_item_flags(proto_item *pi, const int group, const guint severity)
{
- if (proto_item_set_expert_flags(pi, group, severity)) {
+ if (pi != NULL && PITEM_FINFO(pi) != NULL && (severity >= FI_GET_FLAG(PITEM_FINFO(pi), PI_SEVERITY_MASK))) {
+ FI_REPLACE_FLAGS(PITEM_FINFO(pi), PI_GROUP_MASK, group);
+ FI_REPLACE_FLAGS(PITEM_FINFO(pi), PI_SEVERITY_MASK, severity);
+
/* propagate till toplevel item */
pi = proto_item_get_parent(pi);
expert_set_item_flags(pi, group, severity);
- }
+ }
}
static proto_tree*