33.29. slapi_mods_add_string()

Appends a new mod to Slapi_Mods structure with a single attribute value provided as a string.
Description

This function appends a new mod with a single string attribute value to a Slapi_Mods. The mod is constructed from copies of the values of modtype, type, and val.

Syntax

#include "slapi-plugin.h"
void slapi_mods_add_string( Slapi_Mods *smods, int modtype, const char *type, const char *val);

Parameters

This function takes the following parameters:

mods
Pointer to an initialized Slapi_Mods.
modtype
One of LDAP_MOD_ADD, LDAP_MOD_DELETE, or LDAP_MOD_REPLACE.
type
The LDAP attribute type.
val
The attribute value represented as a null-terminated string.
Memory Concerns

This function must not be used on a Slapi_Mods initialized with slapi_mods_init_byref().