Avoid inifite loops sorting by timestamps. #141

This commit is contained in:
Kaian 2016-09-02 10:52:50 +02:00
parent e3bb5fd07c
commit f02a242f67
2 changed files with 8 additions and 0 deletions

View File

@ -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);
}

View File

@ -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));
}