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

slapi_value_set_string_passin()

Sets the value of a Slapi_Value structure from a string.

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 in which to set the value.

strVal

The string containing the value to set.

Returns

This function returns 0 if the value is set, or -1 if the pointer to the Slapi_Value structure is NULL.

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.

Memory Concerns

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