diff options
Diffstat (limited to 'epan/dissectors/packet-mtp3.c')
-rw-r--r-- | epan/dissectors/packet-mtp3.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/epan/dissectors/packet-mtp3.c b/epan/dissectors/packet-mtp3.c index 3a59049dfa..51f631ef2f 100644 --- a/epan/dissectors/packet-mtp3.c +++ b/epan/dissectors/packet-mtp3.c @@ -440,7 +440,7 @@ dissect_mtp3_3byte_pc(tvbuff_t *tvb, guint offset, proto_tree *tree, gint ett_pc } static void -dissect_mtp3_sio(tvbuff_t *tvb, packet_info *pinfo, proto_tree *mtp3_tree) +dissect_mtp3_sio(tvbuff_t *tvb, packet_info *pinfo, proto_tree *mtp3_tree, void ** const pd_save) { guint8 sio; proto_item *sio_item; @@ -477,6 +477,8 @@ dissect_mtp3_sio(tvbuff_t *tvb, packet_info *pinfo, proto_tree *mtp3_tree) proto_tree_add_uint(sio_tree, hf_mtp3_service_indicator, tvb, SIO_OFFSET, SIO_LENGTH, sio); /* Store the SI so that subidissectors know what SI this msg is */ + assert(NULL != pd_save); + *pd_save = pinfo->private_data; pinfo->private_data = GUINT_TO_POINTER(sio & SERVICE_INDICATOR_MASK); } @@ -636,6 +638,7 @@ dissect_mtp3_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) static void dissect_mtp3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { + void* pd_save; mtp3_tap_rec_t* tap_rec = ep_alloc0(sizeof(mtp3_tap_rec_t)); /* Set up structures needed to add the protocol subtree and manage it */ @@ -682,7 +685,7 @@ dissect_mtp3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Dissect the packet (even if !tree so can call sub-dissectors and update * the source and destination address columns) */ - dissect_mtp3_sio(tvb, pinfo, mtp3_tree); + dissect_mtp3_sio(tvb, pinfo, mtp3_tree, &pd_save); dissect_mtp3_routing_label(tvb, pinfo, mtp3_tree); memcpy(&(tap_rec->addr_opc),mtp3_addr_opc,sizeof(mtp3_addr_pc_t)); @@ -694,6 +697,7 @@ dissect_mtp3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tap_queue_packet(mtp3_tap, pinfo, tap_rec); dissect_mtp3_payload(tvb, pinfo, tree); + pinfo->private_data = pd_save; } void |