forked from osmocom/wireshark
epan: Make find_or_create_conversation create what it finds and vice versa
The endpoint elements pinfo->conv_endpoint and pinfo->conv_elements cause find_or_create_conversation (via find_conversation_pinfo) to look for conversations based on those endpoints. It should also make it create conversations based on those endpoints, so that subsequent calls find the same conversation it just created instead of repeatedly creating new ones.
This commit is contained in:
parent
babb059f21
commit
b093b6a992
|
@ -1745,9 +1745,17 @@ find_or_create_conversation(packet_info *pinfo)
|
||||||
DPRINT(("did not find previous conversation for frame #%u",
|
DPRINT(("did not find previous conversation for frame #%u",
|
||||||
pinfo->num));
|
pinfo->num));
|
||||||
DINDENT();
|
DINDENT();
|
||||||
conv = conversation_new(pinfo->num, &pinfo->src,
|
if (pinfo->use_endpoint) {
|
||||||
&pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype),
|
conv = conversation_new(pinfo->num, &pinfo->conv_endpoint->addr1, &pinfo->conv_endpoint->addr2,
|
||||||
pinfo->srcport, pinfo->destport, 0);
|
pinfo->conv_endpoint->etype, pinfo->conv_endpoint->port1,
|
||||||
|
pinfo->conv_endpoint->port2, 0);
|
||||||
|
} else if (pinfo->conv_elements) {
|
||||||
|
conv = conversation_new_full(pinfo->num, pinfo->conv_elements);
|
||||||
|
} else {
|
||||||
|
conv = conversation_new(pinfo->num, &pinfo->src,
|
||||||
|
&pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype),
|
||||||
|
pinfo->srcport, pinfo->destport, 0);
|
||||||
|
}
|
||||||
DENDENT();
|
DENDENT();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue