Copies a string in the value of a Slapi_Value structure.
#include "slapi-plugin.h" int slapi_value_set_string(Slapi_Value *value, const char *strVal);
This function takes the following parameters:
Pointer to the Slapi_Value structure in which to set the value.
The string containing the value to set.
This function returns one of the following:
0 if value is set.
-1 if the pointer to the Slapi_Value is NULL.
This function sets the value of the Slapi_Value structure by duplicating the string strVal.
If the pointer to the Slapi_Value is NULL, nothing is done and the function returns -1. 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() .