> On July 5, 2014, 9:04 a.m., Matt Jordan wrote: > > /team/group/media_formats-reviewed-trunk/main/format_cap.c, lines 160-164 > > <https://reviewboard.asterisk.org/r/3713/diff/1/?file=62293#file62293line160> > > > > Hm. I thought we got rid of this on purpose, since the > > ao2_alloc_options of the framed object already provides it a ref count of 1. > > > > Who decrements the allocation reference? > > Corey Farrell wrote: > We did remove it by mistake. After format_cap_framed_init we need framed > to have 2 references. The one we add here belongs to the cap->formats list, > the other (from ao2_alloc) belongs to cap->preference_order. > > These two references are removed when the format is removed from the cap. > See format_cap_destroy or ast_format_cap_remove for example, the frame is > decremented when removed from the cap->formats and cap->preference_order. > This without this reference I'm adding back in we get a frack for every > format added to a cap.
Works for me - thanks for fixing it :-) - Matt ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviewboard.asterisk.org/r/3713/#review12494 ----------------------------------------------------------- On July 4, 2014, 3:49 p.m., Corey Farrell wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviewboard.asterisk.org/r/3713/ > ----------------------------------------------------------- > > (Updated July 4, 2014, 3:49 p.m.) > > > Review request for Asterisk Developers. > > > Repository: Asterisk > > > Description > ------- > > I missed a couple issues on r3689: > * chan_mgcp: buf unused variable prevents devmode build > * chan_skinny / chan_unistim: tech.capabilities double ao2_cleanup > * format_cap: ao2_ref(framed, +1) was mistakenly removed, causing many fracks > > In the case of format_cap, I didn't notice that it was being added to a > cap->formats and caps->preference_order. > > > Diffs > ----- > > /team/group/media_formats-reviewed-trunk/main/format_cap.c 418064 > /team/group/media_formats-reviewed-trunk/channels/chan_unistim.c 418064 > /team/group/media_formats-reviewed-trunk/channels/chan_skinny.c 418064 > /team/group/media_formats-reviewed-trunk/channels/chan_mgcp.c 418064 > > Diff: https://reviewboard.asterisk.org/r/3713/diff/ > > > Testing > ------- > > Compile, run, shutdown gracefully with no fracks. > > > Thanks, > > Corey Farrell > >
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
