diff --git a/src/rtp.c b/src/rtp.c index bc000fc..6cb12a3 100644 --- a/src/rtp.c +++ b/src/rtp.c @@ -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); } diff --git a/src/sip_msg.c b/src/sip_msg.c index f8192a0..0f5b456 100644 --- a/src/sip_msg.c +++ b/src/sip_msg.c @@ -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)); }