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

Table of Contents

Advertisement

Parameter block.
pb
ID of the name-value pair that you want to get. For a list of IDs that you
arg
can specify, see chapter 16, "Parameter Block Reference."
Pointer to the value retrieved from 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 void
argument should always be a pointer to the type of value you are
*value
retrieving:
int connid = 0;
...
retval = slapi_pblock_get(pb, SLAPI_CONN_ID, &connid);
is an integer value, so you will pass in a pointer to/address of an
SLAPI_CONN_ID
integer to get the value. Similarly, for a
to/address of the value. For example:
char *binddn = NULL;
...
retval = slapi_pblock_get(pb, SLAPI_CONN_DN, &binddn);
With certain compilers on some platforms, you may have to cast the value to
.
*)
We recommend that you set the value to
slapi_pblock_get()
to
slapi_pblock_get()
In most instances, the caller should not free the returned value. The value will
usually be freed internally or through the call to
exception is if the value is explicitly set by the caller through
In this case, the caller is responsible for memory management. If the value is freed,
it is strongly recommended that the free is followed by a call to
slapi_pblock_set()
char * value
or
0
to avoid reading from uninitialized memory, in case the call
fails.
with a value of
. For example:
NULL
Functions for Managing Parameter Block
(a string), pass in a pointer
before calling
NULL
slapi_pblock_destroy()
slapi_pblock_set()
Chapter 15
Function Reference
(void
. The
.
435

Advertisement

Table of Contents
loading

This manual is also suitable for:

Directory server 7.1

Table of Contents