If the lack of a peer conversation is a bug, use one of the

dissector-bug macros.  If it's just that we're missing some packets, we
should handle that as best we can and, if there's stuff we can't do,
maybe put something into the protocol summary or tree saying "not enough
information".  Don't just spit out a warning message which the user
might not even see.

svn path=/trunk/; revision=35426
This commit is contained in:
Guy Harris 2011-01-08 16:40:46 +00:00
parent ea4ac173d0
commit 132f13c2f9
1 changed files with 7 additions and 9 deletions

View File

@ -749,19 +749,17 @@ static conversation_t *get_peer_conversation(packet_info * pinfo, jxta_stream_co
{
conversation_t * peer_conversation = NULL;
if ((AT_NONE != tpt_conv_data->initiator_address.type) && (AT_NONE != tpt_conv_data->receiver_address.type)) {
peer_conversation = find_conversation(pinfo->fd->num, &tpt_conv_data->initiator_address, &tpt_conv_data->receiver_address,
if ((AT_NONE != tpt_conv_data->initiator_address.type) && (AT_NONE != tpt_conv_data->receiver_address.type)) {
peer_conversation = find_conversation(pinfo->fd->num, &tpt_conv_data->initiator_address, &tpt_conv_data->receiver_address,
PT_NONE, 0, 0, NO_PORT_B);
if (create && (NULL == peer_conversation)) {
peer_conversation = conversation_new(pinfo->fd->num, &tpt_conv_data->initiator_address,
if (create && (NULL == peer_conversation)) {
peer_conversation = conversation_new(pinfo->fd->num, &tpt_conv_data->initiator_address,
&tpt_conv_data->receiver_address, PT_NONE, 0, 0, NO_PORT_B);
conversation_set_dissector(peer_conversation, stream_jxta_handle);
}
conversation_set_dissector(peer_conversation, stream_jxta_handle);
}
} else {
g_warning("Uninitialized peer conversation");
}
}
return peer_conversation;
}