aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-bittorrent.c4
-rw-r--r--epan/dissectors/packet-dtpt.c7
-rw-r--r--epan/dissectors/packet-quake.c8
3 files changed, 6 insertions, 13 deletions
diff --git a/epan/dissectors/packet-bittorrent.c b/epan/dissectors/packet-bittorrent.c
index 48d4dafb99..feb08fd71a 100644
--- a/epan/dissectors/packet-bittorrent.c
+++ b/epan/dissectors/packet-bittorrent.c
@@ -812,9 +812,7 @@ static gboolean test_bittorrent_packet (tvbuff_t *tvb, packet_info *pinfo,
if (tvb_length(tvb) >= 20 &&
tvb_get_guint8(tvb, 0) == 19 &&
tvb_memeql(tvb, 1, "BitTorrent protocol", 19) == 0) {
- /* XXXX why new ? */
- conversation = conversation_new (pinfo->fd->num, &pinfo->src, &pinfo->dst, pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
-
+ conversation = find_or_create_conversation(pinfo);
conversation_set_dissector(conversation, dissector_handle);
dissect_bittorrent(tvb, pinfo, tree);
diff --git a/epan/dissectors/packet-dtpt.c b/epan/dissectors/packet-dtpt.c
index f82b3257dc..92c2701fc5 100644
--- a/epan/dissectors/packet-dtpt.c
+++ b/epan/dissectors/packet-dtpt.c
@@ -733,11 +733,8 @@ dissect_dtpt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (message_type == LookupBeginRequest) {
conversation_t *c;
- c = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst, PT_TCP, pinfo->srcport,
- pinfo->destport, 0);
- if (c) {
- conversation_set_dissector(c, dtpt_conversation_handle);
- }
+ c = find_or_create_conversation(pinfo);
+ conversation_set_dissector(c, dtpt_conversation_handle);
}
if (tree) {
diff --git a/epan/dissectors/packet-quake.c b/epan/dissectors/packet-quake.c
index 888de7ca6d..dd348a42e9 100644
--- a/epan/dissectors/packet-quake.c
+++ b/epan/dissectors/packet-quake.c
@@ -220,11 +220,9 @@ dissect_quake_CCREP_ACCEPT
conversation_t *c;
port = tvb_get_letohl(tvb, 0);
- c = conversation_new( pinfo->fd->num, &pinfo->src, &pinfo->dst, PT_UDP, port,
- pinfo->destport, 0);
- if (c) {
- conversation_set_dissector(c, quake_handle);
- }
+ c = find_or_create_conversation(pinfo);
+ conversation_set_dissector(c, quake_handle);
+
if (tree) {
proto_tree_add_uint(tree, hf_quake_CCREP_ACCEPT_port,
tvb, 0, 4, port);