Don't try to report -ve roundtrip delays

svn path=/trunk/; revision=19778
This commit is contained in:
Martin Mathieson 2006-11-02 11:51:09 +00:00
parent 23ce819952
commit 8dbd2e1f1d
1 changed files with 14 additions and 3 deletions

View File

@ -2127,10 +2127,21 @@ static void calculate_roundtrip_delay(tvbuff_t *tvb, packet_info *pinfo,
gint total_gap = (seconds_between_packets*1000) +
(nseconds_between_packets / 1000000);
gint delay = total_gap - (int)(((double)dlsr/(double)65536) * 1000.0);
gint dlsr_ms = (int)(((double)dlsr/(double)65536) * 1000.0);
gint delay;
/* Record that the LSR matches */
p_packet_data->lsr_matched = TRUE;
if (dlsr_ms > total_gap)
{
delay = 0;
}
else
{
/* Delay is gap - dlsr */
delay = total_gap - dlsr_ms;
}
/* Record that the LSR matches */
p_packet_data->lsr_matched = TRUE;
/* No useful calculation can be done if dlsr not set... */
if (dlsr)