19.7. slapi_attr_get_bervals_copy()

Description

This function copies the values from an attribute into an array of berval structure pointers.

Syntax

#include "slapi-plugin.h"
int slapi_attr_get_bervals_copy( Slapi_Attr *a, struct berval ***vals );

Parameters

This function takes the following parameters:

a Attribute that contains the desired values.
vals Pointer to an array of berval structure pointers to hold the desired values.
Returns

This function returns one of the following values:

  • 0 if values are found.
  • -1 if null.
Memory Concerns

You should free this array using ber_bvecfree from the LDAP SDK for C.