[asterisk-dev] Fixed: Reloading chan_unicall unloads res_odbc

Mike Fedyk mfedyk at mikefedyk.com
Sat Jun 10 13:14:35 MST 2006


I'll be the first one to give the standard "please post your patch to a 
bug in mantis".

And I'll add one more thing.  Can you send two patches.  One that moves 
the function within the file and one that contains the changes to that 
function.

Thanks

Adolfo R. Brandes wrote:
>  This is for users of Steve Underwood's chan_unicall (and Steve himself).
>
>  I found a weird bug when using chan_unicall and res_odbc together,
> where issuing a:
>
> CLI> reload
>
>  Would cause res_odbc to be unloaded during chan_unicall's reload
> procedure (not by coincidence, it turns out).
>
>  I was able to duplicate this in several boxes, running on anything
> from Red Hat 7.2 and Fedora Core 4, from asterisk-1.2.4 to
> asterisk-1.2.9.1, and various versions of unixODBC and libmyodbc.
>
>  It was always the same chan_unicall.c, however.  Namely:
>
>  http://www.soft-switch.org/downloads/unicall/unicall-0.0.3pre9/libunicall-0.0.3.tar.gz 
>
> (dated 13-Aug-2005 09:51).
>
>  To make a long story short, this version of chan_unicall.c does not
> declare and call the static __unload_module(), as I'm guessing it
> should.  So I went ahead and hacked it a bit, based on what I found
> here:
>
> http://lists.digium.com/pipermail/svn-commits/2003-December/000610.html
>
>  Make, make install, and voi la!  No more reload problems.
>
>  I attached the patch for review.  Not much to it:
>
> * substituting calls to unload_module() for __unload_module()
> * renaming "int unload_module()" to "static int __unload_module()"
> * moving __unload_module up the code a bit, for the sake of the compiler
> * creating the "int unload_module()" dummy
>
> Cheers,
> Adolfo R. Brandes
> ------------------------------------------------------------------------
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
>   



More information about the asterisk-dev mailing list