fix #225-#231: the enum lmp_filter_keys contained holes, so the logic to detect the...
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 4 Jun 2005 21:39:36 +0000 (21:39 +0000)
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 4 Jun 2005 21:39:36 +0000 (21:39 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14552 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-lmp.c

index 5ce749e0d4b86f1c945c15aab95614e7883b628d..2a44b571101f07431be42b868bf2a9336734929d 100644 (file)
@@ -1025,7 +1025,10 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                            offset+3, 1, message_type);
        proto_tree_add_text(lmp_header_tree, tvb, offset+4, 2, "Length: %d bytes",
                            msg_length);
-       if (LMPF_MSG + message_type < LMPF_MSG_MAX && message_type > 0) {
+/*     if (LMPF_MSG + message_type < LMPF_MSG_MAX && message_type > 0) {*/
+    /* this "if" is still a hack, but compared to the former one at least correct */
+    if ((message_type >= LMPF_MSG_CONFIG && message_type <= LMPF_MSG_CHANNEL_STATUS_RESP) ||
+        (message_type >= LMPF_MSG_SERVICE_CONFIG && message_type <= LMPF_MSG_SERVICE_CONFIG_NACK) ) {
            proto_tree_add_boolean_hidden(lmp_header_tree, lmp_filter[LMPF_MSG + message_type], tvb,
                                          offset+3, 1, 1);
        } else {