Hi all,
I'm trying to load some attributes from DB to an avp and check if the value is greater than 0 (zero). I'm trying to limit the max sessions per user@domain. But when I execute "avp_db_load(..)" I get the error: "avpops:dbrow2avp: wrong field types in dbrow". I'm using unixodbc with oracle as DBRMs. The table DDL is: UUID(VARCHAR2), USERNAME(VARCHAR2), DOMAIN(VARCHAR2), ATTRIBUTE(VARCHAR2), VALUE(VARCHAR2), TYPE(NUMBER)
Follow bellow the source:
if (method == "REGISTER") { if ( avp_db_load("$fu","$avp(s:maxsessions)/avp_user_attributes") && avp_check("$avp(s:maxsessions)", "gt/0/g") ) { save("location") ; return; } else { sl_send_reply("503", "Service Unavailable"); return; } }
I've checked the AVP source and the field types seems to be ok. I don't what to do.
Thanks in advance,
Noel
ps: Sorry about the poor English
Hello,
can you change the code and print the type of the rows in that error message (function dbrow2avp() in avpops_impl.c). I can send a patch if you let me know the version of your openser.
Seems that the driver sets a different type for returned values than openser expects.
Cheers, Daniel
On 04/17/08 04:44, Noel R. Morais wrote:
Hi all,
I'm trying to load some attributes from DB to an avp and check if the value is greater than 0 (zero). I'm trying to limit the max sessions per user@domain. But when I execute "avp_db_load(..)" I get the error: "avpops:dbrow2avp: wrong field types in dbrow". I'm using unixodbc with oracle as DBRMs. The table DDL is: UUID(VARCHAR2), USERNAME(VARCHAR2), DOMAIN(VARCHAR2), ATTRIBUTE(VARCHAR2), VALUE(VARCHAR2), TYPE(NUMBER)
Follow bellow the source:
if (method == "REGISTER") { if ( avp_db_load("$fu","$avp(s:maxsessions)/avp_user_attributes") && avp_check("$avp(s:maxsessions)", "gt/0/g") ) { save("location") ; return; } else { sl_send_reply("503", "Service Unavailable"); return; } }
I've checked the AVP source and the field types seems to be ok. I don't what to do.
Thanks in advance,
Noel
ps: Sorry about the poor English
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
I'm using the 1.1.0 notls version.
I tried to change the code to: /* check the value types */ if ( (row->values[0].type!=DB_STRING && row->values[0].type!=DB_STR) || (row->values[1].type!=DB_STRING && row->values[1].type!=DB_STR) || row->values[2].type!=DB_INT ) { LOG(L_ERR,"ERROR:avpops:dbrow2avp: wrong field types in dbrow: [attr value: %i" "], [attr name: %i], [attr type: %i]",row->values[0].type, row->values[1].type, row->values[2].type); return -1; }
But when I try to start openser I get the follow error: openser: ERROR: load_module: could not open module </usr/lib/openser/modules/avpops.so>: /usr/lib/openser/modules/avpops.so: unde fined symbol: fm_malloc
is There another way to know what type is returned?
Thank you Daniel,
Noel
On Thu, Apr 17, 2008 at 3:46 AM, Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
can you change the code and print the type of the rows in that error message (function dbrow2avp() in avpops_impl.c). I can send a patch if you let me know the version of your openser.
Seems that the driver sets a different type for returned values than openser expects.
Cheers, Daniel
On 04/17/08 04:44, Noel R. Morais wrote:
Hi all,
I'm trying to load some attributes from DB to an avp and check if the value is greater than 0 (zero). I'm trying to limit the max sessions per user@domain. But when I execute "avp_db_load(..)" I get the error: "avpops:dbrow2avp: wrong field types in dbrow". I'm using unixodbc with oracle as DBRMs. The table DDL is: UUID(VARCHAR2), USERNAME(VARCHAR2), DOMAIN(VARCHAR2), ATTRIBUTE(VARCHAR2), VALUE(VARCHAR2), TYPE(NUMBER)
Follow bellow the source:
if (method == "REGISTER") { if ( avp_db_load("$fu","$avp(s:maxsessions)/avp_user_attributes") && avp_check("$avp(s:maxsessions)", "gt/0/g") ) { save("location") ; return; } else { sl_send_reply("503", "Service Unavailable"); return; } }
I've checked the AVP source and the field types seems to be ok. I don't what to do.
Thanks in advance,
Noel
ps: Sorry about the poor English
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
What is the operating system? Did you compile complete openser (core and all modules) from sources or just the avpops and replaced it the /usr/lib/openser/modules?
You need to compile all of them to properly link the symbols.
PREFIX=/usr make all include_modules="mysql" PREFIX=/usr make install include_modules="mysql"
Cheers, Daniel
On 04/18/08 22:34, Noel R. Morais wrote:
I'm using the 1.1.0 notls version.
I tried to change the code to: /* check the value types */ if ( (row->values[0].type!=DB_STRING && row->values[0].type!=DB_STR) || (row->values[1].type!=DB_STRING && row->values[1].type!=DB_STR) || row->values[2].type!=DB_INT ) { LOG(L_ERR,"ERROR:avpops:dbrow2avp: wrong field types in dbrow: [attr value: %i" "], [attr name: %i], [attr type: %i]",row->values[0].type, row->values[1].type, row->values[2].type); return -1; }
But when I try to start openser I get the follow error: openser: ERROR: load_module: could not open module </usr/lib/openser/modules/avpops.so>: /usr/lib/openser/modules/avpops.so: unde fined symbol: fm_malloc
is There another way to know what type is returned?
Thank you Daniel,
Noel
On Thu, Apr 17, 2008 at 3:46 AM, Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
can you change the code and print the type of the rows in that error message (function dbrow2avp() in avpops_impl.c). I can send a patch if you let me know the version of your openser.
Seems that the driver sets a different type for returned values than openser expects.
Cheers, Daniel
On 04/17/08 04:44, Noel R. Morais wrote:
Hi all,
I'm trying to load some attributes from DB to an avp and check if the value is greater than 0 (zero). I'm trying to limit the max sessions per user@domain. But when I execute "avp_db_load(..)" I get the error: "avpops:dbrow2avp: wrong field types in dbrow". I'm using unixodbc with oracle as DBRMs. The table DDL is: UUID(VARCHAR2), USERNAME(VARCHAR2), DOMAIN(VARCHAR2), ATTRIBUTE(VARCHAR2), VALUE(VARCHAR2), TYPE(NUMBER)
Follow bellow the source:
if (method == "REGISTER") { if ( avp_db_load("$fu","$avp(s:maxsessions)/avp_user_attributes") && avp_check("$avp(s:maxsessions)", "gt/0/g") ) { save("location") ; return; } else { sl_send_reply("503", "Service Unavailable"); return; } }
I've checked the AVP source and the field types seems to be ok. I don't what to do.
Thanks in advance,
Noel
ps: Sorry about the poor English
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users