[asterisk-dev] how to export symbols from app_ and chan_ objects?

Tzafrir Cohen tzafrir.cohen at xorcom.com
Wed Feb 22 02:12:52 MST 2006


On Wed, Feb 22, 2006 at 01:22:38PM +1100, Edwin Groothuis wrote:
> On Tue, Feb 21, 2006 at 11:20:16AM +0100, Marc Haisenko wrote:
> > On Monday 20 February 2006 23:43, Tilghman Lesher wrote:
> > > Why not simply write your app directly into chan_zap.c and use the
> > > corresponding ast_register_application and ast_unregister_application
> > > APIs?  This is already being done for another app that needs similar
> > > access to private zaptel channel structures.
> > 
> > Suggestions like these explain why Asterisk is full of >100kB source files... 
> > I really hope this was a joke.
> 
> [/home/edwin/asterisk/asterisk/1.2.4] root at bluebox>find . -name '*.c' | wc
>     379     379    8084
> 
> [/home/edwin/asterisk/asterisk/1.2.4] root at bluebox>find . -name '*.c' -exec ls -l {} \; | sort -n -k 5 | tail -13
> -rw-r--r--  1 root root 99590 Feb 14 14:56 ./ast_expr2f.c
> -rw-r--r--  1 edwin edwin 103928 Jan 26 08:00 ./channels/chan_skinny.c
> -rw-r--r--  1 edwin edwin 113730 Jan 26 08:24 ./channel.c
> -rw-r--r--  1 edwin edwin 114908 Jan 26 08:24 ./apps/app_queue.c
> -rw-r--r--  1 edwin edwin 129200 Jan 26 08:00 ./channels/chan_mgcp.c
> -rw-r--r--  1 edwin edwin 150510 Jan 26 08:01 ./pbx/pbx_dundi.c
> -rw-r--r--  1 edwin edwin 165788 Jan 26 08:01 ./apps/app_rpt.c
> -rw-r--r--  1 edwin edwin 176867 Jan 26 08:24 ./pbx.c
> -rw-r--r--  1 edwin edwin 186219 Jan 26 08:00 ./say.c
> -rw-r--r--  1 edwin edwin 208315 Jan 26 08:01 ./apps/app_voicemail.c
> -rw-r--r--  1 edwin edwin 317844 Jan 26 08:24 ./channels/chan_iax2.c
> -rw-r--r--  1 root root 351435 Feb 21 23:24 ./channels/chan_zap.c
> -rw-r--r--  1 root root 440003 Feb 14 14:56 ./channels/chan_sip.c
> 
> Just a little bit more than 3 percent. Try again!

But then again, the most commonly used channels happen to be there.

app_voicemail.c is another case of an app doing much more than should
have needed to.

-- 
Tzafrir Cohen     icq#16849755  +972-50-7952406
tzafrir.cohen at xorcom.com  http://www.xorcom.com



More information about the asterisk-dev mailing list