Sun Java System Directory Server Enterprise Edition 6.2 Developer's Guide

slapi_value_set_berval()

Copies the value from a berval structure into a Slapi_Value structure.

Syntax

#include "slapi-plugin.h"
 Slapi_Value * slapi_value_set_berval(Slapi_Value *value,
    const struct berval *bval );

Parameters

This function takes the following parameters:

value

Pointer to the Slapi_Value structure in which to set the value.

bval

Pointer to the berval value to be copied.

Returns

This function returns the pointer to the Slapi_Value structure passed as the parameter, or NULL if it was NULL.

Description

This function sets the value of Slapi_Value structure. The value is duplicated from the berval structure bval.

Memory Concerns

If the pointer to the Slapi_Value structure is NULL, nothing is done and the function returns NULL . If the Slapi_Value already contains a value, it is freed from memory before the new one is set.

When you are no longer using the Slapi_Value structure, you should free it from memory by calling slapi_value_free() .

See Also

slapi_value_free()