diff options
Diffstat (limited to 'epan/dissectors/packet-tcp.c')
-rw-r--r-- | epan/dissectors/packet-tcp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index 5b1b2ff39d..e4c0e850a2 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -880,7 +880,7 @@ mptcp_init_subflow(tcp_flow_t *flow) static void mptcp_attach_subflow(struct mptcp_analysis* mptcpd, struct tcp_analysis* tcpd) { - mptcpd->subflows = g_slist_prepend(mptcpd->subflows, tcpd); + wmem_list_prepend(mptcpd->subflows, tcpd); /* in case we merge 2 mptcp connections */ tcpd->mptcp_analysis = mptcpd; } @@ -1933,7 +1933,7 @@ static void mptcp_analysis_add_subflows(packet_info *pinfo _U_, tvbuff_t *tvb, proto_tree *parent_tree, struct mptcp_analysis* mptcpd) { - GSList *it; + wmem_list_frame_t *it; proto_tree *tree; proto_item *item; int counter=0; @@ -1944,8 +1944,8 @@ mptcp_analysis_add_subflows(packet_info *pinfo _U_, tvbuff_t *tvb, tree=proto_item_add_subtree(item, ett_mptcp_analysis_subflows); /* for the analysis, we set each subflow tcp stream id */ - for( it = mptcpd->subflows; it != NULL; it = g_slist_next(it)) { - struct tcp_analysis *sf = (struct tcp_analysis *)it->data; + for( it = wmem_list_head(mptcpd->subflows); it != NULL; it = wmem_list_frame_next(it)) { + struct tcp_analysis *sf = (struct tcp_analysis *)wmem_list_frame_data(it); proto_item *subflow_item; subflow_item=proto_tree_add_uint(tree, hf_mptcp_analysis_subflows_stream_id, tvb, 0, 0, sf->stream); PROTO_ITEM_SET_HIDDEN(subflow_item); @@ -3078,6 +3078,7 @@ mptcp_alloc_analysis(struct tcp_analysis* tcpd) { DISSECTOR_ASSERT(tcpd->mptcp_analysis == 0); mptcpd = (struct mptcp_analysis*)wmem_new0(wmem_file_scope(), struct mptcp_analysis); + mptcpd->subflows = wmem_list_new(wmem_file_scope()); mptcpd->stream = mptcp_stream_count++; tcpd->mptcp_analysis = mptcpd; |