Merges (adds) an array of Slapi_Value data values to a specified attribute in an entry. If the entry does not contain the attribute specified, the attribute is created with the value supplied.
#include "slapi-plugin.h" int slapi_entry_merge_values_sv( Slapi_Entry *e, const char *type, Slapi_Value **vals );
This function takes the following parameters:
Entry into which you want to merge values.
Attribute type that contains the values you want to merge.
Values that you want to merge into the entry. Values are of type Slapi_Value.
This function returns either LDAP_SUCCESS or LDAP_NO_SUCH_ATTRIBUTE .
This function adds additional Slapi_Value data values to the existing values contained in an attribute. If the attribute type does not exist, it is created.
If the specified attribute exists in the entry, the function merges the value specified and returns LDAP_SUCCESS. If the attribute is not found in the entry, the function creates it with the Slapi_Value specified and returns LDAP_NO_SUCH_ATTRIBUTE.
Notice that if this function fails, it leaves the values for type within a pointer to e in an indeterminate state. The present value set may be truncated.
This function makes a copy of vals. vals can be NULL.