[asterisk-dev] Compiling app_cbmysql for asterisk 1.6.2

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Wed Aug 12 11:34:00 CDT 2009


On Tuesday 11 August 2009 19:01:31 Alex Villací­s Lasso wrote:
> Dan Austin escribio':
> > Alex wrote:
> >>> The bulk of the logic/code in the module is MySQL related, with very
> >>> minimal Asterisk API calls.  The primary reason I have not updated the
> >>> app to compile for 1.6 is that the scheduling features (and a few
> >>> enhancements) have been merged into app_meetme.
> >>>
> >>> Is there a problem with using the scheduling features in app_meetme?
> >>> What is driving the desire to continue to use app_cbmysql?
> >>
> >> Essentially, we want a drop-in replacement for app_cbmysql that works
> >> under 1.6.x and continues to use the MySQL tables that were created for
> >> Asterisk 1.4.x. We have a couple of web-based tools that use the cbmysql
> >> tables and they should continue to work when upgrading to Asterisk
> >> 1.6.x.
> >
> > That I understand.  When I submitted the scheduling features patch for
> > app_meetme I included the ability to customize the column names that
> > the realtime engine would use.  That was shot down, and a number of the
> > column names I used for web-meetme/app_cbmysql were vetoed.
> >
> > I do have a small script that will alter the column names to work with
> > 1.6 Asterisk, and it will be included with WMM 4.0.  If you have other
> > tools Built around the existing tables and column names, I can understand
> > not wanting to go down that road.
> >
> > If you want to send me a copy of your modified app_cbmysql.c I can review
> > it and see if anything stands out.
>
> Here it is. The code just compiles correctly, but I am still trying to
> set up an actual test. Some points I know will need work:
> - Reloading is set up to fail, since I did not (yet) check what should
> happen in order to make the module update the configuration without
> unloading and reloading itself.
> - By comparing cdr_addon_mysql from asterisk-addons 1.4.9 and 1.6.2.0, I
> see that many (but not all) static pointers to character strings have
> been replaced with struct ast_str * . What is the difference between
> using this struct type and using a plain char * ?

The ast_str * type is an implementation of dynamic strings, allowing you
an easy interface to set and append to strings, without ever worrying if
you're exceeding the length of the buffer.  The buffer grows as needed.

-- 
Tilghman & Teryl
with Peter, Cottontail, Midnight, Thumper, & Johnny (bunnies)
and Harry, BB, & George (dogs)



More information about the asterisk-dev mailing list