[asterisk-dev] Help needed for main/pbx.c
Russell Bryant
russell at digium.com
Wed Nov 3 14:58:22 CDT 2010
On Wed, 2010-11-03 at 20:02 +0100, Stefan Schmidt wrote:
> Am 03.11.2010 17:47, schrieb Jeff Peeler:
> > A 1.4 based branch is located here:
> >
> > https://origsvn.digium.com/svn/asterisk/team/jpeeler/issue18165
> >
> > I was never able to reproduce the issue, so any testing is appreciated.
> >
> > Jeff Peeler
> > Digium, Inc. | Software Developer
> > 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
> > Check us out at www.digium.com & www.asterisk.org
> >
> thanks jeff to commit this patch,
>
> only one thing i have noticed by looking over the code is that you use
> the container only as a link list with one bucket. i may be wrong but
> isnt an extension unique in every context?
> wouldnt it be better to use the hint->exten value for hash cmp cause you
> use several times ao2_find with an extension but only have one single
> ao2_callback to get hints by callback id.
>
> its just a question if there is a reason i have not seen ;)
Is ao2_find() actually being used in that code? For some reason, I
thought I remembered it not being used anywhere. That's why I started
by only using 1 bucket, since multiple didn't seem to provide any
benefit.
In the case of processing state changes, I'm not sure how we could make
it any better. Device state changes are always reported for a single
device, and a hint can be mapped to multiple devices. So, hashing on
the device name isn't very useful.
--
Russell Bryant
Digium, Inc. | Engineering Manager, Open Source Software
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
jabber: rbryant at digium.com -=- skype: russell-bryant
www.digium.com -=- www.asterisk.org -=- blogs.asterisk.org
More information about the asterisk-dev
mailing list