mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-21 04:46:29 +00:00
Merge "res_pjsip_session: Check for errors from ast_stream_topology_set_stream."
This commit is contained in:
@@ -678,7 +678,10 @@ static int handle_incoming_sdp(struct ast_sip_session *session, const pjmedia_sd
|
|||||||
if (!stream) {
|
if (!stream) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
ast_stream_topology_set_stream(session->pending_media_state->topology, i, stream);
|
if (ast_stream_topology_set_stream(session->pending_media_state->topology, i, stream)) {
|
||||||
|
ast_stream_free(stream);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
session_media = ast_sip_session_media_state_add(session, session->pending_media_state, ast_media_type_from_str(media), i);
|
session_media = ast_sip_session_media_state_add(session, session->pending_media_state, ast_media_type_from_str(media), i);
|
||||||
@@ -1745,7 +1748,10 @@ static int sdp_requires_deferral(struct ast_sip_session *session, const pjmedia_
|
|||||||
/* As this is only called on an incoming SDP offer before processing it is not possible
|
/* As this is only called on an incoming SDP offer before processing it is not possible
|
||||||
* for streams and their media sessions to exist.
|
* for streams and their media sessions to exist.
|
||||||
*/
|
*/
|
||||||
ast_stream_topology_set_stream(session->pending_media_state->topology, i, stream);
|
if (ast_stream_topology_set_stream(session->pending_media_state->topology, i, stream)) {
|
||||||
|
ast_stream_free(stream);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
session_media = ast_sip_session_media_state_add(session, session->pending_media_state, ast_media_type_from_str(media), i);
|
session_media = ast_sip_session_media_state_add(session, session->pending_media_state, ast_media_type_from_str(media), i);
|
||||||
if (!session_media) {
|
if (!session_media) {
|
||||||
|
Reference in New Issue
Block a user