Hi Bogdan<div>Thank you. Its working now.<br><br><div class="gmail_quote">2010/1/15 Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Leonid,<br>
<br>
Looks like there is a compatibility bug between permission and db_text modules when comes to DB data types....Give me couple of days to sort this out.<br>
<br>
In the mean while, if you want to use db_text for permissions, please use the attached patch.<br>
<br>
Thanks and regards,<br>
Bogdan<br>
<br>
<br>
Леонид Наседкин wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">
Hi there.<br>
I'm trying to use permission module with db_text, and it's not working, and I can't understand what's wrong.<br>
Opensips 1.6.1 svnrevision: 2:6509<br>
<br>
In opensips.cfg:<br>
loadmodule "db_text.so"<br>
modparam("db_text", "db_mode", 0)<br>
loadmodule "permissions.so"<br>
modparam("permissions","db_url", "text:///etc/opensips/dbtext")<br>
<br>
In /etc/opensips/dbtext/address:<br>
id(int,auto) grp(int) ip(str) mask(int) port(int) proto(str) pattern(str,null) context_info(str,null)<br>
10:1:10.100.0.0:23:5060:udp::<br>
20:1:10.110.0.0:23:5060:udp::<br>
30:1:10.120.0.0:23:5060:udp::<br>
<br>
LOG:<br>
<br>
DBG:core:init_mod: initializing module permissions<br>
DBG:permissions:mod_init: initializing...<br>
WARNING:permissions:parse_config_file: file not found: /etc/opensips/permissions.allow<br>
WARNING:permissions:mod_init: default allow file (/etc/opensips/permissions.allow) not found => empty rule set<br>
WARNING:permissions:parse_config_file: file not found: /etc/opensips/permissions.deny<br>
WARNING:permissions:mod_init: default deny file (/etc/opensips/permissions.deny) not found => empty rule set<br>
DBG:core:find_mod_export: found <db_bind_api> in module db_text [/usr/lib/opensips/modules/]<br>
DBG:core:db_bind_mod: using db bind api for db_text<br>
INFO:db_text:dbt_init: using database at: /etc/opensips/dbtext/<br>
DBG:db_text:dbt_cache_get_db: looking for db /etc/opensips/dbtext/!<br>
DBG:db_text:dbt_cache_get_db: new db!<br>
DBG:db_text:dbt_load_file: request for table [version]<br>
DBG:db_text:dbt_load_file: db is [/etc/opensips/dbtext/]<br>
DBG:db_text:dbt_load_file: loading file [/etc/opensips/dbtext//version]<br>
DBG:db_text:dbt_table_new: mtime is 1263556066<br>
DBG:db_text:dbt_load_file: column[0] is STR!<br>
DBG:db_text:dbt_load_file: column[1] is INT!<br>
DBG:db_text:dbt_query: new res with 1 cols<br>
DBG:db_text:dbt_result_new: new res with 1 cols<br>
DBG:core:db_new_result: allocate 28 bytes for result set at 0x816b044<br>
DBG:core:db_allocate_columns: allocate 16 bytes for result columns at 0x816aedc<br>
DBG:core:db_allocate_rows: allocate 28 bytes for result rows and values at 0x816b090<br>
DBG:core:db_free_columns: freeing result columns at 0x816aedc<br>
DBG:core:db_free_rows: freeing 1 rows<br>
DBG:core:db_free_row: freeing row values at 0x816b098<br>
DBG:core:db_free_rows: freeing rows at 0x816b090<br>
DBG:core:db_free_result: freeing result set at 0x816b044<br>
DBG:db_text:dbt_load_file: request for table [address]<br>
DBG:db_text:dbt_load_file: db is [/etc/opensips/dbtext/]<br>
DBG:db_text:dbt_load_file: loading file [/etc/opensips/dbtext//address]<br>
DBG:db_text:dbt_table_new: mtime is 1263558311<br>
DBG:db_text:dbt_load_file: column[0] is INT!<br>
DBG:db_text:dbt_load_file: column[1] is INT!<br>
DBG:db_text:dbt_load_file: column[2] is STR!<br>
DBG:db_text:dbt_load_file: column[3] is INT!<br>
DBG:db_text:dbt_load_file: column[4] is INT!<br>
DBG:db_text:dbt_load_file: column[5] is STR!<br>
DBG:db_text:dbt_load_file: column[6] is STR!<br>
DBG:db_text:dbt_load_file: column[7] is STR!<br>
DBG:db_text:dbt_query: new res with 8 cols<br>
DBG:db_text:dbt_result_new: new res with 8 cols<br>
DBG:core:db_new_result: allocate 28 bytes for result set at 0x816b004<br>
DBG:core:db_allocate_columns: allocate 128 bytes for result columns at 0x8186b68<br>
DBG:core:db_allocate_rows: allocate 504 bytes for result rows and values at 0x8186bf4<br>
DBG:permissions:reload_address_table: number of rows in address table: 3<br>
ERROR:permissions:reload_address_table: database problem<br>
DBG:core:db_free_columns: freeing result columns at 0x8186b68<br>
DBG:core:db_free_rows: freeing 3 rows<br>
DBG:core:db_free_row: freeing row values at 0x8186c0c<br>
DBG:core:db_free_row: freeing row values at 0x8186cac<br>
DBG:core:db_free_row: freeing row values at 0x8186d4c<br>
DBG:core:db_free_rows: freeing rows at 0x8186bf4<br>
DBG:core:db_free_result: freeing result set at 0x816b004<br>
CRITICAL:permissions:init_address: reload of address table failed<br>
ERROR:permissions:mod_init: failed to initialize the allow_address function<br>
ERROR:core:init_mod: failed to initialize module permissions<br>
ERROR:core:main: error while initializing modules<br>
DBG:db_text:destroy: destroy ...<br>
<br>
<br>
-- <br>
WBR, Leonid Nasedkin<br>
icq: 256816<br>
skype: leonidnasedkin<br></div></div>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
</blockquote>
<br>
<br>
-- <br>
Bogdan-Andrei Iancu<br>
<a href="http://www.voice-system.ro" target="_blank">www.voice-system.ro</a><br>
<br>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>WBR, Leonid Nasedkin<br>cell: +7 923 731 0077<br>icq: 256816<br>skype: leonidnasedkin<br>
</div>