summaryrefslogtreecommitdiff
path: root/main/sdp_state.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2017-04-24 16:55:23 -0500
committerRichard Mudgett <rmudgett@digium.com>2017-04-27 19:08:05 -0500
commitd71c6e3bfd0db7b069da326c155766b679de552f (patch)
tree56ae4e4050dcd06e8916443bdea8f61d6ad1b045 /main/sdp_state.c
parent176123e76c1705c2cc3247dcd0e15bbb060e7d9b (diff)
SDP: Make ast_sdp_state_set_remote_sdp() return error.
Change-Id: I7707c9d872c476d897ff459008652b35142a35e1
Diffstat (limited to 'main/sdp_state.c')
-rw-r--r--main/sdp_state.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/main/sdp_state.c b/main/sdp_state.c
index 853450149..2c018b126 100644
--- a/main/sdp_state.c
+++ b/main/sdp_state.c
@@ -1073,7 +1073,7 @@ const void *ast_sdp_state_get_local_sdp_impl(struct ast_sdp_state *sdp_state)
return ast_sdp_translator_from_sdp(sdp_state->translator, sdp);
}
-void ast_sdp_state_set_remote_sdp(struct ast_sdp_state *sdp_state, const struct ast_sdp *sdp)
+int ast_sdp_state_set_remote_sdp(struct ast_sdp_state *sdp_state, const struct ast_sdp *sdp)
{
ast_assert(sdp_state != NULL);
@@ -1081,12 +1081,13 @@ void ast_sdp_state_set_remote_sdp(struct ast_sdp_state *sdp_state, const struct
sdp_state->role = SDP_ROLE_ANSWERER;
}
- merge_sdps(sdp_state, sdp);
+ return merge_sdps(sdp_state, sdp);
}
int ast_sdp_state_set_remote_sdp_from_impl(struct ast_sdp_state *sdp_state, void *remote)
{
struct ast_sdp *sdp;
+ int ret;
ast_assert(sdp_state != NULL);
@@ -1094,9 +1095,9 @@ int ast_sdp_state_set_remote_sdp_from_impl(struct ast_sdp_state *sdp_state, void
if (!sdp) {
return -1;
}
- ast_sdp_state_set_remote_sdp(sdp_state, sdp);
+ ret = ast_sdp_state_set_remote_sdp(sdp_state, sdp);
ast_sdp_free(sdp);
- return 0;
+ return ret;
}
int ast_sdp_state_reset(struct ast_sdp_state *sdp_state)