Previous | Contents | Index |
Initialize PMDF data structures and resources.
status = PMDF_initialize (ischannel)
Argument Data type Access Mechanism ischannel boolean read reference
status = PMDFinitialize (ischannel)
int PMDFinitialize(int ischannel)
ischannel
If true, then user-to-channel access checks will be disabled. If false, then user-to-channel access checks will be enabled.
With the exception ofPMDFsetMutex
,PMDFinitialize
must be called prior to calling any other API routines. This allocates and initializes internal data structures used by the API and PMDF.PMDFinitialize
should only be called once. After all processing is completed,PMDFdone
should be called to release any allocated memory, and ensure that any open files are properly closed. The ischannel flag is used to enable or disable rightslist based user-to-channel access checks. Programs which enqueue messages in behalf of users (e.g., user agents), should invokePMDFinitialize
with ischannel false; channel programs which enqueue mail should invokePMDFinitialize
with ischannel true. When ischannel is false,PMDFenqueueMessage
will also close the queue cache database after enqueuing a message. On OpenVMS systems, channel programs which run indefinitely (e.g., detached processes) should supply a call back procedure toPMDFsetCallBack
so that when a PMDF CACHE/CLOSE command is issued the program can callPMDFcloseQueueCache
when convenient. See Section 1.7 for a further discussion of this issue. Multithreaded routines must callPMDFsetMutex
prior to callingPMDFinitialize
.
PMDF__OK Normal, successful completion. PMDF__FOPN Initialization failed. One or more PMDF configuration files could not be accessed. PMDF configuration files are incorrectly protected. Note that the use of PMDFinitialize
does not require any privileges; unprivileged users should be able to invoke this particular routine.PMDF__NO Initialization failed owing to a version mismatch between the current version of PMDF and the sites compiled configuration. Either the PMDF configuration needs to be recompiled or the character set tables need to be recompiled.
Previous | Next | Contents | Index |