[Kamailio-Devel] [Kamailio-Users] Help to create in core

Henning Westerholt henning.westerholt at 1und1.de
Mon Sep 15 16:01:54 CEST 2008


On Sunday 14 September 2008, Marcio wrote:
> I appreciate very much to help solve some problems in the clearance of a
> function to perform a query Mysql .... created the function based on
> documentation of asipto / kamailio devel which is great ... but I did not
> want to create a new module used the module in domain ... whose goal is a
> proxy to receive  SIP msg should validate the realm with what is in a table
> (Trustee) was created through a query ... it should be used for the config
> file to declare of the table created in the Mysql: modparam ( "domain",
> "trusdomain_table," trusdomain)
> the table version updated with the creation of this table (trusdomain) and
> create the own function in the file: domain.c / h part to be exported in
> domain_mod.c / h....but on the tests a call SIP to proxy kills a openser's
> pid ...
>
> Sep  5 06:32:21 notehome openser[7962]: INFO:core:handle_sigs: child
> process 7964 exited by a signal 11
> Sep  5 06:32:21 notehome openser[7962]: INFO:core:handle_sigs: core was
> generated

Hi Marcio,

you could use the debugger "gdb" to inspect the generated core file, to get a 
clue why the crash happened. You can also increase the debug level to 4, and 
then you'll get more detailed debug informations about stuff that happens in 
the DB API and the other core parts.

I can't comment in detail to the code you've posted but you should move the 
database initialization and open calls to the mod_init/ child_init of the 
module, otherwise for each function call the dabase will be opened again. 
What version of openser/kamailio do you use? I noticed that you do this:

keys[0]=trusdomain_col.s;
cols[0]=trusdomain_col.s;

this is not valid anymore in newer versions, the type of db_key_t is there 
str*, not char*.

If the crash happens in your function, just add some log statements, to 
observe where the crash happens, if you don't like gdb that much.

Hope that helps,

Henning



More information about the Devel mailing list