Fix test for early exit from MMSE dissector.
authorGuy Harris <guy@alum.mit.edu>
Mon, 28 May 2018 18:22:52 +0000 (11:22 -0700)
committerGuy Harris <guy@alum.mit.edu>
Mon, 28 May 2018 18:23:27 +0000 (18:23 +0000)
We don't need to dissect the body if 1) we're *not* building a protocol
tree (tree == NULL) *and* 2) the PDU doesn't have content that can be
handed off to subdissectors.

(Fix which vs. that issue in a comment while we're at it.)

Change-Id: I90890975c05e72cc9ebc776a21683905828f57b5
Reviewed-on: https://code.wireshark.org/review/27876
Reviewed-by: Guy Harris <guy@alum.mit.edu>
epan/dissectors/packet-mmse.c

index a5c78a003748788a67249d3c9776fb20d12861c9..ffb4faa003a963294ce7859b208b56ca9792abce 100644 (file)
@@ -715,10 +715,10 @@ dissect_mmse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 pdut,
     /*
      * Cycle through MMS-headers
      *
-     * NOTE - some PDUs may convey content which can be handed off
+     * NOTE - some PDUs may convey content that can be handed off
      *        to subdissectors.
      */
-    if (tree || pdu_has_content(pdut)) {
+    if (tree == NULL && !pdu_has_content(pdut)) {
         DebugLog(("tree == NULL and PDU has no potential content\n"));
         return;
     }