diff options
author | George Joseph <gjoseph@digium.com> | 2017-05-12 12:29:15 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-05-12 12:29:15 -0500 |
commit | 28d4e6be9b479cda9039c94863a18b01a41a0efe (patch) | |
tree | 623bc42ea87872b9e52b570d05c67b8248c3e4db /main/sdp_state.c | |
parent | f09e0792940af214c99d1e5f13702026673177b7 (diff) | |
parent | c2906dfa05ad6f2d3b952d21d09178e724180e95 (diff) |
Merge "SDP: Remove sdp_state.remote_capabilities"
Diffstat (limited to 'main/sdp_state.c')
-rw-r--r-- | main/sdp_state.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/main/sdp_state.c b/main/sdp_state.c index 0da93e4ac..a9979eb7d 100644 --- a/main/sdp_state.c +++ b/main/sdp_state.c @@ -340,9 +340,7 @@ struct ast_sdp_state { struct sdp_state_capabilities *negotiated_capabilities; /*! Proposed capabilities */ struct sdp_state_capabilities *proposed_capabilities; - /*! Remote capabilities, learned through remote SDP */ - struct ast_stream_topology *remote_capabilities; - /*! Local SDP. Generated via the options and local capabilities. */ + /*! Local SDP. Generated via the options and currently negotiated/proposed capabilities. */ struct ast_sdp *local_sdp; /*! SDP options. Configured options beyond media capabilities. */ struct ast_sdp_options *options; @@ -389,7 +387,6 @@ void ast_sdp_state_free(struct ast_sdp_state *sdp_state) sdp_state_capabilities_free(sdp_state->negotiated_capabilities); sdp_state_capabilities_free(sdp_state->proposed_capabilities); - ast_stream_topology_free(sdp_state->remote_capabilities); ast_sdp_free(sdp_state->local_sdp); ast_sdp_options_free(sdp_state->options); ast_sdp_translator_free(sdp_state->translator); @@ -1007,15 +1004,17 @@ static struct ast_sdp *sdp_create_from_state(const struct ast_sdp_state *sdp_sta static int merge_sdps(struct ast_sdp_state *sdp_state, const struct ast_sdp *remote_sdp) { struct sdp_state_capabilities *joint_capabilities; + struct ast_stream_topology *remote_capabilities; int i; - sdp_state->remote_capabilities = ast_get_topology_from_sdp(remote_sdp); - if (!sdp_state->remote_capabilities) { + remote_capabilities = ast_get_topology_from_sdp(remote_sdp); + if (!remote_capabilities) { return -1; } joint_capabilities = merge_capabilities(sdp_state->proposed_capabilities, - sdp_state->remote_capabilities, sdp_state->options, 0); + remote_capabilities, sdp_state->options, 0); + ast_stream_topology_free(remote_capabilities); if (!joint_capabilities) { return -1; } @@ -1114,9 +1113,6 @@ int ast_sdp_state_reset(struct ast_sdp_state *sdp_state) ast_sdp_free(sdp_state->local_sdp); sdp_state->local_sdp = NULL; - ast_stream_topology_free(sdp_state->remote_capabilities); - sdp_state->remote_capabilities = NULL; - set_proposed_capabilities(sdp_state, NULL); sdp_state->role = SDP_ROLE_NOT_SET; |