diff options
author | Kinsey Moore <kmoore@digium.com> | 2014-01-09 20:34:19 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2014-01-09 20:34:19 +0000 |
commit | 51901aa2ed0a177ad7a2bca3e22be3c8d39bde25 (patch) | |
tree | 78c220ec8f9ef31c9b2c35b375b4db8b85178a74 /res/res_pjsip_session.c | |
parent | bce38c0cc59a3388ef15d0de3e41508be946aa5f (diff) |
astobj2: Correct ao2_iterator opacity violations
This corrects the ao2_iterator opacity violations in
res_pjsip_session.c by adding a global function to get the number of
elements inside the container hidden behind the iterator.
(closes issue ASTERISK-23053)
Review: https://reviewboard.asterisk.org/r/3111/
Reported by: Richard Mudgett
........
Merged revisions 405253 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405254 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_pjsip_session.c')
-rw-r--r-- | res/res_pjsip_session.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c index caaed317a..d548d29b8 100644 --- a/res/res_pjsip_session.c +++ b/res/res_pjsip_session.c @@ -471,7 +471,7 @@ static int handle_negotiated_sdp(struct ast_sip_session *session, const pjmedia_ }; successful = ao2_callback(session->media, OBJ_MULTIPLE, handle_negotiated_sdp_session_media, &callback_data); - if (successful && ao2_container_count(successful->c) == ao2_container_count(session->media)) { + if (successful && ao2_iterator_count(successful) == ao2_container_count(session->media)) { /* Nothing experienced a catastrophic failure */ ast_queue_frame(session->channel, &ast_null_frame); return 0; @@ -2026,7 +2026,7 @@ static struct pjmedia_sdp_session *create_local_sdp(pjsip_inv_session *inv, stru /* Now let the handlers add streams of various types, pjmedia will automatically reorder the media streams for us */ successful = ao2_callback_data(session->media, OBJ_MULTIPLE, add_sdp_streams, local, session); - if (!successful || ao2_container_count(successful->c) != ao2_container_count(session->media)) { + if (!successful || ao2_iterator_count(successful) != ao2_container_count(session->media)) { /* Something experienced a catastrophic failure */ return NULL; } |