aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rlc-lte.c
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2010-11-02 15:17:58 +0000
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2010-11-02 15:17:58 +0000
commit3c5b0127716e8bdcc246d108b29202f155d04943 (patch)
treeacf91cb85440871fd80be85a2655cd08eea7e47c /epan/dissectors/packet-rlc-lte.c
parent780907f9c5884a3f7d33c081ae12fe22f8b0be0b (diff)
Don't allocate context struct until/unless heuristic signature string matches.
svn path=/trunk/; revision=34752
Diffstat (limited to 'epan/dissectors/packet-rlc-lte.c')
-rw-r--r--epan/dissectors/packet-rlc-lte.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/epan/dissectors/packet-rlc-lte.c b/epan/dissectors/packet-rlc-lte.c
index 2138390d3b..066c792c83 100644
--- a/epan/dissectors/packet-rlc-lte.c
+++ b/epan/dissectors/packet-rlc-lte.c
@@ -45,7 +45,7 @@
*/
/* TODO:
- - AM re-assembly?
+ - UM & AM re-assembly?
*/
/********************************/
@@ -1815,17 +1815,6 @@ static gboolean dissect_rlc_lte_heur(tvbuff_t *tvb, packet_info *pinfo,
return FALSE;
}
- /* If redissecting, use previous info struct (if available) */
- p_rlc_lte_info = p_get_proto_data(pinfo->fd, proto_rlc_lte);
- if (p_rlc_lte_info == NULL) {
- /* Allocate new info struct for this frame */
- p_rlc_lte_info = se_alloc0(sizeof(struct rlc_lte_info));
- infoAlreadySet = FALSE;
- }
- else {
- infoAlreadySet = TRUE;
- }
-
/* Do this again on re-dissection to re-discover offset of actual PDU */
/* Needs to be at least as long as:
@@ -1843,6 +1832,19 @@ static gboolean dissect_rlc_lte_heur(tvbuff_t *tvb, packet_info *pinfo,
}
offset += (gint)strlen(RLC_LTE_START_STRING);
+
+ /* If redissecting, use previous info struct (if available) */
+ p_rlc_lte_info = p_get_proto_data(pinfo->fd, proto_rlc_lte);
+ if (p_rlc_lte_info == NULL) {
+ /* Allocate new info struct for this frame */
+ p_rlc_lte_info = se_alloc0(sizeof(struct rlc_lte_info));
+ infoAlreadySet = FALSE;
+ }
+ else {
+ infoAlreadySet = TRUE;
+ }
+
+
/* Read fixed fields */
p_rlc_lte_info->rlcMode = tvb_get_guint8(tvb, offset++);