You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mtree.h defines MT_MAX_DEPTH as 32 and the tprefix database table field is defined as a varchar(32) but the module fails to start if a prefix of 32 characters is present in the database table mapped to the mtree. The error message on start is:
0(10465) ERROR: mtree [mtree.c:156]: mt_add_to_tree(): max prefix len exceeded
0(10465) ERROR: mtree [mtree_mod.c:603]: mt_load_db(): Error adding info to tree
MySQL:
(create a table called mtree per the code in utils/kamctl/mysql/mtree-create.sql)
insert into mtree values (1, '12345678901234567890123456789012', 'foo', 'bar', current_timestamp, 'baz');
Start kamailio and observe that it fails to start. Enable debugging to see the error messages specified above.
Changing the tprefix to '1234567890123456789012345678901' makes Kamailio start successfully.
I propose a fix would entail making Kamailio support prefixes of 32 characters since we then can use GUIDs/UUIDs as "prefixes" without alteration and also adding to the mtree documentation that the maximum prefix length is 32 characters. Another fix would be to let the mtree code be but change the table creation scripts under utils/kamctl/ to create the tprefix field as varchar(31) (and add info about the constraint to the documentation).
The text was updated successfully, but these errors were encountered:
I changed the internal limit to 64, which is 63 chars + ending 0 -- added relevant info to docs. The database definition stays with lower size, can be increased by need.
mtree.h defines MT_MAX_DEPTH as 32 and the tprefix database table field is defined as a varchar(32) but the module fails to start if a prefix of 32 characters is present in the database table mapped to the mtree. The error message on start is:
To reproduce do the following:
Kamailio script:
MySQL:
(create a table called mtree per the code in utils/kamctl/mysql/mtree-create.sql)
Start kamailio and observe that it fails to start. Enable debugging to see the error messages specified above.
Changing the tprefix to '1234567890123456789012345678901' makes Kamailio start successfully.
I propose a fix would entail making Kamailio support prefixes of 32 characters since we then can use GUIDs/UUIDs as "prefixes" without alteration and also adding to the mtree documentation that the maximum prefix length is 32 characters. Another fix would be to let the mtree code be but change the table creation scripts under utils/kamctl/ to create the tprefix field as varchar(31) (and add info about the constraint to the documentation).
The text was updated successfully, but these errors were encountered: