24.28. slapi_entry_delete_values_sv()

Removes an array of Slapi_Value data values from an attribute in an entry.
Description

This function removes an attribute/valueset from an entry. Both the attribute and its Slapi_Value data values are removed from the entry. If you supply a Slapi_Value whose value is NULL, the function will delete the specified attribute from the entry. In either case, the function returns LDAP_SUCCESS.

This function replaces the deprecated slapi_entry_delete_values() function. This function uses Slapi_Value attribute values instead of the now obsolete berval attribute values.
Syntax

#include "slapi-plugin.h"
int slapi_entry_delete_values_sv( Slapi_Entry *e, const char *type, Slapi_Value **vals );

Parameters

This function takes the following parameters:

e
Entry from which you want to delete values.
type
Attribute from which you want to delete values.
vals
Array of Slapi_Value data values that you want to delete.
Returns

This function returns LDAP_SUCCESS if the specified attribute and the array of Slapi_Value data values are deleted from the entry.

If the specified attribute contains a NULL value, the attribute is deleted from the attribute list, and the function returns LDAP_NO_SUCH_ATTRIBUTE. As well, if the attribute is not found in the list of attributes for the specified entry, the function returns LDAP_NO_SUCH_ATTRIBUTE.
If there is an operational error during the processing of this call such as a duplicate value found, the function will return LDAP_OPERATIONS_ERROR. If this occurs, please report the problem to the Red Hat technical support.
Memory Concerns

The vals parameter can be NULL, in which case this function does nothing.

See Also

slapi_entry_delete_values()