aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-lmp.c
diff options
context:
space:
mode:
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2005-06-04 21:39:36 +0000
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2005-06-04 21:39:36 +0000
commit26b01e5ac7aa0e058860f39f868da89c08e6f3bf (patch)
tree04958a415e34eabc825bee9fc6721ff9f0504658 /epan/dissectors/packet-lmp.c
parent89fdf2a14214d8bf99553bbcbb8765be08e6c53f (diff)
fix #225-#231: the enum lmp_filter_keys contained holes, so the logic to detect the field type failed, resulting in the bug
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14552 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-lmp.c')
-rw-r--r--epan/dissectors/packet-lmp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/epan/dissectors/packet-lmp.c b/epan/dissectors/packet-lmp.c
index 5ce749e0d4..2a44b57110 100644
--- a/epan/dissectors/packet-lmp.c
+++ b/epan/dissectors/packet-lmp.c
@@ -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 {