|
|
b1047b |
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c
|
|
|
b1047b |
index e9af5f8..d994233 100644
|
|
|
b1047b |
--- a/epan/dissectors/packet-tcp.c
|
|
|
b1047b |
+++ b/epan/dissectors/packet-tcp.c
|
|
|
b1047b |
@@ -1924,6 +1924,7 @@ again:
|
|
|
b1047b |
* being a new higher-level PDU that also
|
|
|
b1047b |
* needs desegmentation).
|
|
|
b1047b |
*/
|
|
|
b1047b |
+ remove_last_data_source(pinfo);
|
|
|
b1047b |
fragment_set_partial_reassembly(&tcp_reassembly_table,
|
|
|
b1047b |
pinfo, msp->first_frame, NULL);
|
|
|
b1047b |
|
|
|
b1047b |
diff --git a/epan/packet.c b/epan/packet.c
|
|
|
b1047b |
index 44b953f..509fb22 100644
|
|
|
b1047b |
--- a/epan/packet.c
|
|
|
b1047b |
+++ b/epan/packet.c
|
|
|
b1047b |
@@ -237,9 +237,24 @@ add_new_data_source(packet_info *pinfo, tvbuff_t *tvb, const char *name)
|
|
|
b1047b |
src = (struct data_source *)g_malloc(sizeof(struct data_source));
|
|
|
b1047b |
src->tvb = tvb;
|
|
|
b1047b |
src->name = g_strdup(name);
|
|
|
b1047b |
+ /* This could end up slow, but we should never have that many data
|
|
|
b1047b |
+ * sources so it probably doesn't matter */
|
|
|
b1047b |
pinfo->data_src = g_slist_append(pinfo->data_src, src);
|
|
|
b1047b |
}
|
|
|
b1047b |
|
|
|
b1047b |
+void
|
|
|
b1047b |
+remove_last_data_source(packet_info *pinfo)
|
|
|
b1047b |
+{
|
|
|
b1047b |
+ struct data_source *src;
|
|
|
b1047b |
+ GSList *last;
|
|
|
b1047b |
+
|
|
|
b1047b |
+ last = g_slist_last(pinfo->data_src);
|
|
|
b1047b |
+ src = (struct data_source *)last->data;
|
|
|
b1047b |
+ pinfo->data_src = g_slist_delete_link(pinfo->data_src, last);
|
|
|
b1047b |
+ g_free(src->name);
|
|
|
b1047b |
+ g_slice_free(struct data_source, src);
|
|
|
b1047b |
+}
|
|
|
b1047b |
+
|
|
|
b1047b |
const char*
|
|
|
b1047b |
get_data_source_name(const struct data_source *src)
|
|
|
b1047b |
{
|
|
|
b1047b |
diff --git a/epan/packet.h b/epan/packet.h
|
|
|
b1047b |
index e1a195b..f90199d 100644
|
|
|
b1047b |
--- a/epan/packet.h
|
|
|
b1047b |
+++ b/epan/packet.h
|
|
|
b1047b |
@@ -408,6 +408,8 @@ final_registration_all_protocols(void);
|
|
|
b1047b |
*/
|
|
|
b1047b |
WS_DLL_PUBLIC void add_new_data_source(packet_info *pinfo, tvbuff_t *tvb,
|
|
|
b1047b |
const char *name);
|
|
|
b1047b |
+/* Removes the last-added data source, if it turns out it wasn't needed */
|
|
|
b1047b |
+WS_DLL_PUBLIC void remove_last_data_source(packet_info *pinfo);
|
|
|
b1047b |
|
|
|
b1047b |
|
|
|
b1047b |
/*
|