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


Adds a string value to an attribute in an entry.


#include "slapi-plugin.h"
 int slapi_entry_add_string (Slapi_Entry *e, const char *type,
    const char *value);


This function takes the following parameters:


Entry to which you want to add a string value.


Attribute to which you want to add a string value.


String value you want to add.


This function returns 0 when successful; any other value returned signals failure.


This function adds a string value to the existing attribute values in an entry. If the specified attribute does not exist in the entry, the attribute is created with the string value specified.

This function does not check whether the value is already present for the attribute. Use slapi_entry_attr_delete() before using this function.

This function also does not check whether the value added is a duplicate of an existing value.

Memory Concerns

This routine makes a copy of the parameter value. If value is NULL, the entry is not changed.