23.4. slapi_ch_bvecdup()

Description

Makes a copy of an array of existing berval structures.

Syntax

#include "slapi-plugin.h"
extern struct berval** slapi_ch_bvecdup (const struct berval **v);

Parameters

This function takes the following parameter:

v
Pointer to the array of berval structures that you want to copy.
Returns

This function returns a pointer to an array of the new copy of the berval structures. If the structures cannot be duplicated, e.g., because of insufficient virtual memory, the slapd program terminates.

Memory Concerns

The contents of the v parameter are not altered by this function. The returned berval structure should be freed by calling ber_bvfree(), which is an LDAP API function; see the Mozilla LDAP SDK for C Programmer's Guide.

See Also