42.27. slapi_value_set_value()

Description

This function sets the value of the Slapi_Value structure. This value is duplicated from the Slapi_Value structure vfrom. vfrom must not be NULL.

Syntax

#include "slapi-plugin.h"
slapi_value_set_value( Slapi_Value *value, const Slapi_Value *vfrom);

Parameters

This function takes the following parameters:

value
Pointer to the Slapi_Value in which to set the value.
vfrom
Pointer to the Slapi_Value from which to get the value.
Returns

This function returns one of the following values:

  • The pointer to the Slapi_Value structure passed as the parameter.
  • NULL if it was NULL.
Memory Concerns

If the pointer to the Slapi_Value is NULL, nothing is done, and the function returns NULL. If the Slapi_Value already contains a value, it is freed from 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().