42.26. slapi_value_set_string_passin()

Description

This function sets the value of Slapi_Value structure with the string strVal. If the Slapi_Value structure already contains a value, it is freed from memory before the new one is set. The string strVal must not be freed from memory.

Syntax

#include "slapi-plugin.h"
int slapi_value_set_string_passin ( Slapi_Value *value, char *strVal);

Parameters

This function takes the following parameters:

value
Pointer to the Slapi_Value structure into which the value will be set.
strVal
The string containing the value to set.
Returns

This function returns one of the following values:

  • 0 if the value is set.
  • -1 if the pointer to the Slapi_Value structure is NULL.
Memory Concerns

Use slapi_value_free() when you are finished working with the structure to free it from memory.