[sr-dev] module related crash

Daniel-Constantin Mierla miconda at gmail.com
Mon Oct 1 09:22:45 CEST 2018


Just in case someone wants to go ahead and update the code for some
modules, in addition for DB1_INT or DB1_BINGINT, the code has to handle
the type DB1_UINT or DB1_UBINGINT if the database table column has
UNSIGNED type. All types have to be taken in consideration, because only
MySQL defines the UNSIGNED, others that were analyzed so far (e.g.,
postgres client lib) has only signed types.

Cheers,
Daniel


On 01.10.18 09:19, Daniel-Constantin Mierla wrote:
> It is the same case -- the database schema defined unsigned types of
> columns although internally only signed types were supported. This works
> fine as long as the value inserted in the database is a positive integer
> (not a negative integer).
>
> Will review all database table definitions and update accordingly. Once
> is finished, I will post an update.
>
> Cheers,
> Daniel
>
>
> On 01.10.18 08:59, Juha Heinanen wrote:
>> Daniel-Constantin Mierla writes:
>>
>>> This was related to adding support for UNSIGNED types. So far we had
>>> only signed types in DB API, but latest MySQL version is inserting 0
>>> without any error when the actual value is a signed negative value.
>>>
>>> Should be fixed now in latest master, try with it and see if all fine
>>> now.
>> I built K again and got a new error:
>>
>> Oct  1 09:55:37 char /usr/bin/sip-proxy[18235]: ERROR: lcr [lcr_mod.c:1047]: insert_gws(): lcr_gw id at row <0> is null or not int
>> Oct  1 09:55:37 char /usr/bin/sip-proxy[18235]: CRITICAL: lcr [lcr_mod.c:759]: mod_init(): failed to reload lcr tables
>> Oct  1 09:55:37 char /usr/bin/sip-proxy[18235]: ERROR: <core> [core/sr_module.c:890]: init_mod(): Error while initializing module lcr (/usr/lib/x86_64-linux-gnu/sip-proxy/modules/lcr.so)
>> Oct  1 09:55:37 char /usr/bin/sip-proxy[18235]: INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
>>
>> This starts to get serious.
>>
>> -- Juha
>>

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference -- www.kamailioworld.com
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- www.asipto.com




More information about the sr-dev mailing list