Hi.

There is a patch. There is a some typo in session compare code.
I don`t realy sure aboute patched code version - but patch is not very big :)

Bye.
--
Best regards,
Vladimir O. Luchko
Novosibirsk, Eltex 
E-mail: vlad.l...@mail.ru
From 8acab71cfad25ea092ace0396c27610f89dd439c Mon Sep 17 00:00:00 2001
From: Luchko Vladimir <vlad.luch@mail.ru>
Date: Thu, 28 Oct 2010 11:48:32 +0700
Subject: [PATCH] fix: sdp sessions compare

---
 libsofia-sip-ua/sdp/sdp.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libsofia-sip-ua/sdp/sdp.c b/libsofia-sip-ua/sdp/sdp.c
index dda452c..5c868fa 100644
--- a/libsofia-sip-ua/sdp/sdp.c
+++ b/libsofia-sip-ua/sdp/sdp.c
@@ -1207,7 +1207,7 @@ int sdp_session_cmp(sdp_session_t const *a, sdp_session_t const *b)
   for (ab = a->sdp_bandwidths, bb = b->sdp_bandwidths;
        ab || bb;
        ab = ab->b_next, bb = bb->b_next)
-    if ((rv = sdp_bandwidth_cmp(a->sdp_bandwidths, b->sdp_bandwidths)))
+    if ((rv = sdp_bandwidth_cmp(ab, bb)))
       return rv;
 
   if ((rv = sdp_time_cmp(a->sdp_time, b->sdp_time)))
@@ -1216,7 +1216,7 @@ int sdp_session_cmp(sdp_session_t const *a, sdp_session_t const *b)
     return rv;
 
   for (aa = a->sdp_attributes, ba = b->sdp_attributes;
-       aa || bb;
+       aa || ba;
        aa = aa->a_next, ba = ba->a_next)
     if ((rv = sdp_attribute_cmp(aa, ba)))
       return rv;
@@ -1514,14 +1514,14 @@ int sdp_media_cmp(sdp_media_t const *a, sdp_media_t const *b)
   for (ab = a->m_bandwidths, bb = b->m_bandwidths;
        ab || bb;
        ab = ab->b_next, bb = bb->b_next)
-    if ((rv = sdp_bandwidth_cmp(a->m_bandwidths, b->m_bandwidths)))
+    if ((rv = sdp_bandwidth_cmp(ab, bb)))
       return rv;
 
   if ((rv = sdp_key_cmp(a->m_key, b->m_key)))
     return rv;
 
   for (aa = a->m_attributes, ba = b->m_attributes;
-       aa || bb;
+       aa || ba;
        aa = aa->a_next, ba = ba->a_next)
     if ((rv = sdp_attribute_cmp(aa, ba)))
       return rv;
-- 
1.7.5.rc3

------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to