Initialize PMDF data structures and resources.
argument informationstatus = PMDF_initialize (ischannel)
| Argument | Data type | Access | Mechanism |
|---|---|---|---|
| ischannel | boolean | read | reference |
argument informationstatus = PMDFinitialize (ischannel)
int PMDFinitialize (ischannel)
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 of PMDF_set_mutex, PMDF_initialize must be called prior to calling any other API routines. This allocates and initializes internal data structures used by the API and PMDF. PMDF_initialize should only be called once. After all processing is completed, PMDF_done 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 invoke PMDF_initialize with ischannel false; channel programs which enqueue mail should invoke PMDF_initialize with ischannel true. When ischannel is false, PMDF_enqueue_message 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 to PMDF_set_call_back so that when a PMDF CACHE/CLOSE command is issued the program can call PMDF_close_queue_cache when convenient. See Section 1.7 for a further discussion of this issue. Multithreaded routines must call PMDF_set_mutex prior to calling PMDF_initialize.Return Values
| 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 PMDF_initialize 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. |