]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_session: Check for removed stream state.
authorBen Ford <bford@digium.com>
Fri, 15 Sep 2017 14:43:21 +0000 (09:43 -0500)
committerBen Ford <bford@digium.com>
Wed, 20 Sep 2017 17:14:15 +0000 (12:14 -0500)
commit90b68dd54b57cc83c5fe773a012a485c12fff27b
tree919b0645798f905c816113b1c1d96d2cfa93c8d4
parente5fdee036e8bdc1926d67cb3eeb0b2d6fd8fb7c3
res_pjsip_session: Check for removed stream state.

When a sip session is refreshed, the stream topology is looped
through, checking each stream for compatible formats. This would
cause a crash if the stream state was AST_STREAM_STATE_REMOVED,
since the formats would never be set for this stream, causing
a NULL value to be returned from ast_stream_get_formats. This
commit adds a check for streams with removed states.

Also removed a stray semicolon.

Change-Id: Ic86f8b65a4a26a60885b28b8b1a0b22e1b471d42
main/bridge.c
res/res_pjsip_sdp_rtp.c
res/res_pjsip_session.c