[sr-dev] git:master: modules/mtree: when loading data from db, load each tree separately

Daniel-Constantin Mierla miconda at gmail.com
Wed Oct 30 20:52:29 CET 2013


On 10/30/13 4:45 PM, Juha Heinanen wrote:
> Daniel-Constantin Mierla writes:
>
>> mtree module works with two types of database tables:
>> - one having only (tprefix, tvalue)
>> - one having also tree name (tname, tprefix, tvalue)
>>
>> Your change seems to affect the first case, which is supposed not to
>> have tname column, thus not working.
>>
>> If you keep all the trees in the same database table, you should set db
>> table parameter for the module:
>> - http://kamailio.org/docs/modules/stable/modules/mtree.html#idp2546944
> it reads:
>
> 3.2. db_table (string)
>
> Name of database table where data for trees is stored. It is ignored if
> a 'mtree' parameter is defined.
>
> since i have defined two 'mtree' parameters, db_table param has no
> meaning.
>
> in my tests, the change that i made has worked fine.  in which case
> would it fail?
if you define the trees with module parameters, then you have to use 
different tables in database, one for each. Those tables don't need 
tname column.

If you just store all the trees in one table (which has tname column), 
then don't define them in the config, just set the table where they are 
stored. A reload command will reload all the trees in that table

Cheers,
Daniel

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Trainings - Berlin, Nov 25-28
   - more details about Kamailio trainings at http://www.asipto.com -




More information about the sr-dev mailing list