diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2010-05-13 18:28:34 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2010-05-13 18:28:34 +0000 |
commit | 729de1a635cd21379db622c93f945a19b9f645b2 (patch) | |
tree | 5eb52f5028c6a0ff45e0e6c0501b28f827d62600 /epan/dissectors/packet-tftp.c | |
parent | 1c18115bd3e8a0b1a56ab8effcf5843240bde0c6 (diff) |
As suggested in http://www.wireshark.org/lists/wireshark-dev/200809/msg00075.html
(as referenced in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2907 ) and
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3411 :
Write a new convenience routine for finding a conversation and, if it is not
found, create it. The frame number and addresses are taken from pinfo (as is
the common case).
Use this function in a bunch of dissectors.
svn path=/trunk/; revision=32790
Diffstat (limited to 'epan/dissectors/packet-tftp.c')
-rw-r--r-- | epan/dissectors/packet-tftp.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/epan/dissectors/packet-tftp.c b/epan/dissectors/packet-tftp.c index d6a9f138cd..faee582ce8 100644 --- a/epan/dissectors/packet-tftp.c +++ b/epan/dissectors/packet-tftp.c @@ -164,7 +164,7 @@ tftp_dissect_options(tvbuff_t *tvb, packet_info *pinfo, int offset, } static void dissect_tftp_message(tftp_conv_info_t *tftp_info, - tvbuff_t *tvb, packet_info *pinfo, + tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree *tftp_tree = NULL; @@ -369,13 +369,7 @@ dissect_embeddedtftp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint16 opcode; tftp_conv_info_t *tftp_info; - conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, - pinfo->ptype, pinfo->srcport, pinfo->destport, 0); - if(conversation == NULL) { - conversation = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst, - pinfo->ptype, - pinfo->srcport,pinfo->destport, 0); - } + conversation = find_or_create_conversation(pinfo); tftp_info = conversation_get_proto_data(conversation, proto_tftp); if (!tftp_info) { |