res_pjsip_session: Check for removed stream state.
authorBen Ford <bford@digium.com>
Fri, 15 Sep 2017 14:43:21 +0000 (09:43 -0500)
committerBenjamin Keith Ford <bford@digium.com>
Wed, 20 Sep 2017 17:14:45 +0000 (12:14 -0500)
commite666051d790bb2a9d1e9ff6bb11bd69db6e0efba
treefbaff373e27c9c3d2d739a5d6e2fc4eec514b026
parent8830cc05415c0d18ea1a10a43173fb20f79d8f8c
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