Make frames containing Malformed expert items match with "malformed" display filter.
authormartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 16 Jul 2010 11:17:32 +0000 (11:17 +0000)
committermartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 16 Jul 2010 11:17:32 +0000 (11:17 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33551 f5534014-38df-0310-8fa8-9805f1628bb7

epan/expert.c

index 5233859265274d834b1b342b103bfae33092f556..5dc38f3b189f20508bfa8704b177a981f2218adb 100644 (file)
@@ -142,6 +142,13 @@ expert_create_tree(proto_item *pi, int group, int severity, const char *msg)
                                            msg);
        PROTO_ITEM_SET_GENERATED(ti);
 
+       if (group == PI_MALFORMED) {
+               /* Add hidden malformed protocol filter */
+               gint proto_malformed = proto_get_id_by_filter_name("malformed");
+               proto_item *malformed_ti = proto_tree_add_item(tree, proto_malformed, NULL, 0, 0, FALSE);
+               PROTO_ITEM_SET_HIDDEN(malformed_ti);
+       }
+
        return proto_item_add_subtree(ti, ett_subexpert);
 }