Slapi_Pblock_Get() - Netscape DIRECTORY SERVER 7.0 - PLUG-IN Manual

For plug-in
Table of Contents

Advertisement

Functions for Managing Parameter Block
Memory Concerns
The parameter block that you wish to free must have been created using
slapi_pblock_new()
(for example,
supported and may lead to memory errors and memory leaks. For example:
Slapi_PBlock *pb = malloc(sizeof(Slapi_PBlock));
After calling this function, you should set the
reusing freed memory in your function context, as in the following:
slapi_pblock_destroy(pb);
pb =NULL;
If you reuse the pointer in this way, it makes it easier to identify a Segmentation
Fault, rather than using some difficult method to detect memory leaks or other
abnormal behavior.
It is safe to call this function with a NULL pointer. For example:
Slapi_PBlock *pb = NULL;
slapi_pblock_destroy(pb);
This saves the trouble of checking for NULL before calling
slapi_pblock_destroy()
See Also
slapi_pblock_new()

slapi_pblock_get()

Gets the value of a name-value pair from a parameter block.
Syntax
#include "slapi-plugin.h"
int slapi_pblock_get( Slapi_PBlock *pb, int arg, void *value );
Parameters
This function takes the following parameters:
pb
arg
value
432
Netscape Directory Server Plug-in Programmer's Guide • October 2004
. Use of this function with
;) or using another memory allocator is not
Slapi_PBlock pb
.
Parameter block.
ID of the name-value pair that you want to get. For a list of IDs that you
can specify, see chapter 16, "Parameter Block Reference."
Pointer to the value retrieved from the parameter block.
allocated on the stack
pblocks
pointer to
pblock
NULL
to avoid

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the NETSCAPE DIRECTORY SERVER 7.0 - PLUG-IN and is the answer not in the manual?

This manual is also suitable for:

Netscape directory server 7.0

Table of Contents