Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] [Patch] to voip_calls.c (bug 892 again)

From: Martin Mathieson <martin.mathieson@xxxxxxxxxxxx>
Date: Tue, 04 Jul 2006 10:49:17 +0100
This time with patch attached....

Hi,
Mike Oliveras has indicated that for MGCP voip calls, 2 seconds may be a better timeout for still matching DLCX requests to a hung-up endpoint, as in this patch.

Regards,
Martin
Index: gtk/voip_calls.c
===================================================================
--- gtk/voip_calls.c	(revision 18653)
+++ gtk/voip_calls.c	(working copy)
@@ -2289,11 +2289,15 @@
 				if (pi->endpointId != NULL){
 					if (g_strcasecmp(tmp_mgcpinfo->endpointId,pi->endpointId) == 0){
 						/*
-						   check first if it is an ended call. We consider an ended call after 1sec we don't 
-						   get a packet in this Endpoint and the call has been released
+						   check first if it is an ended call. We can still match packets to this Endpoint 2 seconds
+						   after the call has been released
 						*/
 						diff_time = nstime_to_sec(&pinfo->fd->rel_ts) - tmp_listinfo->stop_sec - (double)tmp_listinfo->stop_usec/1000000;
-						if ( ((tmp_listinfo->call_state == VOIP_CANCELLED) || (tmp_listinfo->call_state == VOIP_COMPLETED)  || (tmp_listinfo->call_state == VOIP_REJECTED)) && (diff_time > 1) ){
+						if ( ((tmp_listinfo->call_state == VOIP_CANCELLED) ||
+						     (tmp_listinfo->call_state == VOIP_COMPLETED)  ||
+						     (tmp_listinfo->call_state == VOIP_REJECTED)) &&
+						       (diff_time > 2) )
+						{
 							tmp_listinfo->call_active_state = VOIP_INACTIVE;
 						} else {
 							strinfo = (voip_calls_info_t*)(list->data);