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

Noel R. Morais noelrocha at gmail.com
Fri Apr 18 21:34:50 CEST 2008


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 at 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 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 sr-users mailing list