forked from Mirrors/sngrep
Avoid inifite loops sorting by timestamps. #141
This commit is contained in:
parent
e3bb5fd07c
commit
f02a242f67
|
@ -458,6 +458,10 @@ stream_is_older(rtp_stream_t *one, rtp_stream_t *two)
|
|||
if (!two)
|
||||
return 1;
|
||||
|
||||
// No, you are not older than yourself
|
||||
if (one == two)
|
||||
return 0;
|
||||
|
||||
// Otherwise
|
||||
return timeval_is_older(one->time, two->time);
|
||||
}
|
||||
|
|
|
@ -166,6 +166,10 @@ msg_is_older(sip_msg_t *one, sip_msg_t *two)
|
|||
if (!two)
|
||||
return 1;
|
||||
|
||||
// No, you are not older than yourself
|
||||
if (one == two)
|
||||
return 0;
|
||||
|
||||
// Otherwise
|
||||
return timeval_is_older(msg_get_time(one), msg_get_time(two));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue