NAME
smfi_setpriv() — sets the private data pointer for the sendmail connection
SYNOPSIS
#include <libmilter/mfapi.h>
int smfi_setpriv(
SMFICTX *ctx,
void *privatedata
);
PARAMETERS
- ctx
Specifies the opaque context structure.
- privatedata
Pointer to the private data.
This value is returned by
subsequent calls to the
smfi_getpriv()
function using the
ctx
argument.
DESCRIPTION
The
smfi_setpriv()
routine sets the private data pointer for the context
ctx.
The
smfi_setpriv()
routine can be called in any
xxfi_*()
callback functions.
Notes
A single private data pointer exists for a connection.
Multiple calls to
smfi_setpriv()
with different values result in loss of old values.
Before a filter terminates, it must
release the private data and set the pointer to a
NULL
value.
RETURN VALUE
The
smfi_setpriv()
routine returns
MI_FAILURE
if
ctx
is an invalid context.
smfi_setpriv()
returns
MI_SUCCESS
if
ctx
is a valid context.
AUTHOR
The
smfi_setpriv()
routine was developed by the Sendmail Inc.