Use find_or_create_conversation() rather than only conversation_new().

Fixes bug #2907: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2907

svn path=/trunk/; revision=33136
This commit is contained in:
Bill Meier 2010-06-07 16:32:21 +00:00
parent 42650b1281
commit b4410bc917
3 changed files with 6 additions and 13 deletions

View File

@ -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);

View File

@ -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) {

View File

@ -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);