[OpenSER-Users] Error when using avp_db_load: "avpops:dbrow2avp: wrong field types in dbrow"

Daniel-Constantin Mierla miconda at gmail.com
Thu Apr 17 08:46:14 CEST 2008


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 at 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 at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/users
>   

-- 
http://www.asipto.com





More information about the Users mailing list