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.
there is another function mt_load_db_trees() that load all the trees at
one shot. my change didn't affect that branch of the code.
-- juha
if(mt_defined_trees())
{
LM_DBG("static trees defined\n");
pt = mt_get_first_tree();
while(pt!=NULL)
{
LM_DBG("loading from tree <%.*s>\n",
pt->tname.len, pt->tname.s);
/* loading all information from database */
if(mt_load_db(&pt->tname)!=0)
{
LM_ERR("cannot load info from database\n");
goto error1;
}
pt = pt->next;
}
} else {
if(db_table.len<=0)
{
LM_ERR("no trees table defined\n");
goto error1;
}
if(mt_init_list_head()<0)
{
LM_ERR("unable to init trees list head\n");
goto error1;
}
/* loading all information from database */
if(mt_load_db_trees()!=0)
{
LM_ERR("cannot load trees from database\n");
goto error1;
}
}