Commit b9fe8a6f authored by Pekka Pessi's avatar Pekka Pessi
Browse files

When offer/answer is completed, store a copy of remote SDP.

darcs-hash:20050911223528-65a35-22f0d980694e9c1f2adbd7206db6523c421563e9.gz
parent ed02c66d
...@@ -1002,8 +1002,16 @@ int soa_base_generate_answer(soa_session_t *ss, ...@@ -1002,8 +1002,16 @@ int soa_base_generate_answer(soa_session_t *ss,
if (!l_sdp || !r_sdp) if (!l_sdp || !r_sdp)
return -1; return -1;
rsession = sdp_session_dup(ss->ss_home, r_sdp);
if (!rsession)
return -1;
soa_set_activity(ss, sdp->sdp_media, 0); if (ss->ss_rsession)
su_free(ss->ss_home, ss->ss_rsession);
ss->ss_rsession = rsession;
soa_set_activity(ss, l_sdp->sdp_media, 0);
soa_set_activity(ss, r_sdp->sdp_media, 1);
ss->ss_offer_recv = 1; ss->ss_offer_recv = 1;
ss->ss_answer_sent = 1; ss->ss_answer_sent = 1;
...@@ -1059,8 +1067,16 @@ int soa_base_process_answer(soa_session_t *ss, ...@@ -1059,8 +1067,16 @@ int soa_base_process_answer(soa_session_t *ss,
if (!l_sdp || !r_sdp) if (!l_sdp || !r_sdp)
return -1; return -1;
rsession = sdp_session_dup(ss->ss_home, r_sdp);
if (!rsession)
return -1;
soa_set_activity(ss, sdp->sdp_media, 0); if (ss->ss_rsession)
su_free(ss->ss_home, ss->ss_rsession);
ss->ss_rsession = rsession;
soa_set_activity(ss, l_sdp->sdp_media, 0);
soa_set_activity(ss, r_sdp->sdp_media, 1);
ss->ss_answer_recv = 1; ss->ss_answer_recv = 1;
ss->ss_complete = 1; ss->ss_complete = 1;
......
...@@ -80,6 +80,8 @@ int soa_get_remote_sdp(soa_session_t const *ss, ...@@ -80,6 +80,8 @@ int soa_get_remote_sdp(soa_session_t const *ss,
char const **return_sdp, char const **return_sdp,
int *return_len); int *return_len);
int soa_clear_remote_sdp(soa_session_t *ss);
int soa_set_local_sdp(soa_session_t *ss, int soa_set_local_sdp(soa_session_t *ss,
char const *str, int len); char const *str, int len);
......
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