aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dcerpc.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2010-05-13 18:28:34 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2010-05-13 18:28:34 +0000
commit729de1a635cd21379db622c93f945a19b9f645b2 (patch)
tree5eb52f5028c6a0ff45e0e6c0501b28f827d62600 /epan/dissectors/packet-dcerpc.c
parent1c18115bd3e8a0b1a56ab8effcf5843240bde0c6 (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-dcerpc.c')
-rw-r--r--epan/dissectors/packet-dcerpc.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c
index 6230629911..a1a05660c0 100644
--- a/epan/dissectors/packet-dcerpc.c
+++ b/epan/dissectors/packet-dcerpc.c
@@ -1,7 +1,7 @@
/* packet-dcerpc.c
* Routines for DCERPC packet disassembly
- * Copyright 2001, Todd Sabin <tas@webspan.net>
- * Copyright 2003, Tim Potter <tpot@samba.org>
+ * Copyright 2001, Todd Sabin <tas[AT]webspan.net>
+ * Copyright 2003, Tim Potter <tpot[AT]samba.org>
*
* $Id$
*
@@ -2803,12 +2803,7 @@ dissect_dcerpc_cn_bind (tvbuff_t *tvb, gint offset, packet_info *pinfo,
}
if (!saw_ctx_item) {
- conv = find_conversation (pinfo->fd->num, &pinfo->src, &pinfo->dst, pinfo->ptype,
- pinfo->srcport, pinfo->destport, 0);
- if (conv == NULL) {
- conv = conversation_new (pinfo->fd->num, &pinfo->src, &pinfo->dst, pinfo->ptype,
- pinfo->srcport, pinfo->destport, 0);
- }
+ conv = find_or_create_conversation(pinfo);
}
/* if this is the first time we see this packet, we need to
@@ -3083,8 +3078,8 @@ dissect_dcerpc_cn_stub (tvbuff_t *tvb, int offset, packet_info *pinfo,
/* Start out assuming we won't succeed in decrypting. */
decrypted_tvb = NULL;
- /* Schannel needs informations into the footer (verifier) in order to setup decryptions keys
- * so we call it in order to have a chance to decypher the data
+ /* Schannel needs informations into the footer (verifier) in order to setup decryptions keys
+ * so we call it in order to have a chance to decypher the data
*/
if (DCE_C_RPC_AUTHN_PROTOCOL_SEC_CHAN == auth_info->auth_type) {
dissect_dcerpc_cn_auth (tvb, offset, pinfo, dcerpc_tree, hdr, TRUE, auth_info);
@@ -5082,12 +5077,7 @@ dissect_dcerpc_dg (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* activity_id and seqnum. I haven't seen anywhere that it would
* make a difference, but for future reference...
*/
- conv = find_conversation (pinfo->fd->num, &pinfo->src, &pinfo->dst, pinfo->ptype,
- pinfo->srcport, pinfo->destport, 0);
- if (!conv) {
- conv = conversation_new (pinfo->fd->num, &pinfo->src, &pinfo->dst, pinfo->ptype,
- pinfo->srcport, pinfo->destport, 0);
- }
+ conv = find_or_create_conversation(pinfo);
/*
* Packet type specific stuff is next.