Commit 532899a9 authored by Pekka Pessi's avatar Pekka Pessi

soa_static.c: always upgrade answer if offer has changed.

sdp.c: fixed sdp_media_cmp() - now include m_mode in comparison.

Based on bug report and initial patch submitted by Legostayev Denis.

darcs-hash:20060905185018-65a35-1e971fbc5cd6735b56aa19b005983f6b0566388b.gz
parent 579df63d
......@@ -1442,6 +1442,9 @@ int sdp_media_cmp(sdp_media_t const *a, sdp_media_t const *b)
if ((rv = str0cmp(a->m_proto_name, b->m_proto_name)))
return rv;
if ((rv = a->m_mode - b->m_mode))
return rv;
for (arm = a->m_rtpmaps, brm = b->m_rtpmaps;
arm || brm;
arm = arm->rm_next, brm = brm->rm_next)
......
......@@ -948,6 +948,7 @@ static int offer_answer_step(soa_session_t *ss,
/* Step E: Upgrade codecs */
switch (action) {
case process_answer:
case generate_answer:
/* Upgrade local SDP based on remote SDP */
if (ss->ss_local_remote_version == remote_version)
break;
......@@ -962,14 +963,14 @@ static int offer_answer_step(soa_session_t *ss,
}
break;
case generate_offer:
case generate_answer:
default:
break;
}
soa_description_free(ss, ss->ss_previous);
if (local == local0) {
if (ss->ss_local->ssd_sdp != local &&
sdp_session_cmp(ss->ss_local->ssd_sdp, local)) {
/* We have modfied local session: update origin-line */
if (local->sdp_origin != o)
*o = *local->sdp_origin, local->sdp_origin = o;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment