Red Hat DIRECTORY SERVER 7.1 - PLUG-IN PROGRAMMERS Manual page 439

Table of Contents

Advertisement

Syntax
#include "slapi-plugin.h"
int slapi_pblock_set( Slapi_PBlock *pb, int arg, void *value );
Parameters
This function takes the following parameters:
Parameter block.
pb
ID of the name-value pair that you want to set. For a list of IDs that you
arg
can specify, see chapter 16, "Parameter Block Reference."
Pointer to the value that you want to set in the parameter block.
value
Returns
This function returns one of the following values:
if successful.
0
if an error occurs (for example, if an invalid ID is specified).
-1
Memory Concerns
The value to be passed in must always be a pointer, even for integer arguments.
For example, if you wanted to do a search with the
int managedsait = 1;
...
slapi_pblock_set(pb, SLAPI_MANAGEDSAIT, &managedsait);
A call similar to the following example will cause a crash:
slapi_pblock_set(pb, SLAPI_MANAGEDSAIT, 1);
However, for values which are already pointers (
,
**arrays
Slapi_Backend *
char *target_dn = slapi_ch_strdup(some_dn);
slapi_pblock_set(pb, SLAPI_TARGET_DN, target_dn);
or
slapi_pblock_set(pb, SLAPI_TARGET_DN, NULL);
char * strings
, etc.), you can pass in the value directly. For example:
Functions for Managing Parameter Block
control:
ManageDSAIT
,
char
Chapter 15
Function Reference
437

Advertisement

Table of Contents
loading

This manual is also suitable for:

Directory server 7.1

Table of Contents