aboutsummaryrefslogtreecommitdiffstats
path: root/epan/conversation.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-07-31 14:14:04 -0700
committerGuy Harris <guy@alum.mit.edu>2018-07-31 21:14:48 +0000
commitd950b14f26432dae1e805853ca90dd35ef4984cf (patch)
tree9ee660e938814aabfdc81f5518072a74c4ca5f7e /epan/conversation.c
parent83715db4a99b58f4314242be5de0865d4ec5993b (diff)
For ISDN, don't create an endpoint by ID and then use it.
That isn't working, because it depends on the notion that for every "endpoint type" there's a "port type" for the packet_info structure; that's not true for ISDN channels. The whole point of "use the packet_info structure when trying to find a conversation and create it if it doesn't exist" is to use address information *already filled in by somebody for use by other dissectors*; we don't do that with the ISDN channel number, because there's no *need* to do so. So just add a new find_or_create_conversation_by_id() routine, which passes the packet_info structure to get the frame number, and explicitly passes the endpoint type and ID. Use that in the ISDN dissector. Bug: 15018 Change-Id: Id0e997254b0eaf7cbc9261a2adff639ecbf083c0 Reviewed-on: https://code.wireshark.org/review/28904 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/conversation.c')
-rw-r--r--epan/conversation.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/epan/conversation.c b/epan/conversation.c
index b2a8ef8b1b..fc94e3d65b 100644
--- a/epan/conversation.c
+++ b/epan/conversation.c
@@ -1508,6 +1508,26 @@ find_or_create_conversation(packet_info *pinfo)
return conv;
}
+conversation_t *
+find_or_create_conversation_by_id(packet_info *pinfo, const endpoint_type etype, const guint32 id)
+{
+ conversation_t *conv=NULL;
+
+ /* Have we seen this conversation before? */
+ if ((conv = find_conversation_by_id(pinfo->num, etype, id, 0)) == NULL) {
+ /* No, this is a new conversation. */
+ DPRINT(("did not find previous conversation for frame #%u",
+ pinfo->num));
+ DINDENT();
+ conv = conversation_new_by_id(pinfo->num, etype, id, 0);
+ DENDENT();
+ }
+
+ DENDENT();
+
+ return conv;
+}
+
void conversation_create_endpoint(struct _packet_info *pinfo, address* addr1, address* addr2,
endpoint_type etype, guint32 port1, guint32 port2, const guint options)
{