diff options
author | Robert Grange <robionekenobi@bluewin.ch> | 2018-01-02 10:17:09 +0100 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2018-01-02 12:14:40 +0000 |
commit | ea60ed427e00232c306ae3e5ffd5ea0ddccb8160 (patch) | |
tree | a57ecf3f3dd571dfbed26b4987d37d32b4afb661 /epan/dissectors/packet-mq.c | |
parent | 3d846aceabb6426d1ec8f21761234ed384003ecb (diff) |
packet-mq: Fix after change 25009
Fix for unused variable mq_MQPRI_vals
Fix test when displaying unique MQ Segment (vs multi MQ segment)
Changed my name in AUTHORS
Change-Id: I8ffa5523dbf8469d2814d2a90348eea61a05823a
Reviewed-on: https://code.wireshark.org/review/25106
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'epan/dissectors/packet-mq.c')
-rw-r--r-- | epan/dissectors/packet-mq.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/epan/dissectors/packet-mq.c b/epan/dissectors/packet-mq.c index b9431fecc3..c72bb1c5cb 100644 --- a/epan/dissectors/packet-mq.c +++ b/epan/dissectors/packet-mq.c @@ -981,6 +981,8 @@ static gboolean mq_reassembly = TRUE; static gboolean mq_in_reassembly = FALSE; static guint32 mq_AsyMsgRsn; +static guint32 mq_AsyMsgAct; +static guint32 mq_AsyMsgTot; static reassembly_table mq_reassembly_table; @@ -3897,6 +3899,8 @@ static int reassemble_mq(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo if (iSegmIndex == 0) { mq_AsyMsgRsn = tvb_get_guint32(tvb, iHdrL + 24, iEnco); + mq_AsyMsgAct = tvb_get_guint32(tvb, iHdrL + 28, iEnco); + mq_AsyMsgTot = tvb_get_guint32(tvb, iHdrL + 32, iEnco); uStrL = tvb_get_guint8(tvb, iHdrL + 54); uPadL = ((((2+1+uStrL)/4)+1)*4)-(2+1+uStrL); } @@ -3931,8 +3935,12 @@ static int reassemble_mq(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo { proto_item *ti = proto_tree_add_item(tree, proto_mq, tvb, 0, -1, ENC_NA); - proto_item_append_text(ti, " [%s of a Reassembled MQ Segment]", - val_to_str_ext(iOpcd, GET_VALS_EXTP(opcode), "Unknown (0x%02x)")); + if (fd_head && !fd_head->next && mq_AsyMsgAct == mq_AsyMsgTot) + proto_item_append_text(ti, " [%s of a Full MQ Segment]", + val_to_str_ext(iOpcd, GET_VALS_EXTP(opcode), "Unknown (0x%02x)")); + else + proto_item_append_text(ti, " [%s of a Reassembled MQ Segment]", + val_to_str_ext(iOpcd, GET_VALS_EXTP(opcode), "Unknown (0x%02x)")); dissect_mq_addCR_colinfo(pinfo, &mq_parm); proto_item_append_text(ti, " Hdl=0x%04x GlbMsgIdx=%d, SegIdx=%d, SegLen=%d", iHdl, iGlbMsgIdx, iSegmIndex, iSegLength); |