replacement for FR function
Arran Cudbard-Bell
a.cudbardb at freeradius.org
Wed Oct 14 17:51:37 CEST 2015
> On Oct 14, 2015, at 10:37 AM, Alan DeKok <aland at deployingradius.com> wrote:
>
> On Oct 14, 2015, at 10:20 AM, Lotkov Svyatoslav <ellezdi at gmail.com> wrote:
>> How can I validate value-pair's value against avpair ?
>> This is done in FR2 by pairparsevalue() function.
>>
>> I tried to use fr_pair_value_from_str() like this:
>>
>> //else if (pairparsevalue(*last, d) == NULL) {
>>
>> else if (fr_pair_value_from_str(*last, d, sizeof(d)) == -1 ) {
>>
>> But the result is:
>>
>> Bad talloc magic value - unknown value
>> talloc abort: Bad talloc magic value - unknown value
>
> Probably because you didn't allocate the VALUE_PAIR using the correct functions.
>
> Don't call malloc(). Call the various pair() functions to create it by name or by number.
Added notes here:
http://wiki.freeradius.org/contributing/Modules3#talloc
-Arran
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20151014/ad2c287e/attachment.sig>
More information about the Freeradius-Users
mailing list