mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-25 15:08:53 +00:00
res_pjsip_sdp_rtp: Fix return code from apply_negotiated_sdp_stream
apply_negotiated_sdp_stream was returning a "1" when no joint capabilities were found on an outgoing call instead of a "-1". This indicated to res_pjsip_session that the handler DID handle the sdp when in fact it didn't. Without the appropriate setup, a subsequent media frame coming in would have an invalid stream_num and cause a seg fault when the stream was attempted to be retrieved. apply_negotiated_sdp_stream now returns the correct "-1" and any media is now discarded before it reaches the core stream processing. ASTERISK-28260 Reported by: Sotiris Ganouris Change-Id: Ia095cb16b4862f2f6ad6d2d2a77453fa2542371f
This commit is contained in:
@@ -1946,7 +1946,7 @@ static int apply_negotiated_sdp_stream(struct ast_sip_session *session,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (set_caps(session, session_media, session_media_transport, remote_stream, 0, asterisk_stream)) {
|
if (set_caps(session, session_media, session_media_transport, remote_stream, 0, asterisk_stream)) {
|
||||||
return 1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the channel uniqueid on the RTP instance now that it is becoming active */
|
/* Set the channel uniqueid on the RTP instance now that it is becoming active */
|
||||||
|
Reference in New Issue
Block a user