Registering an Open Server application with a directory

An Open Server application can specify the directory provider to use and register itself with the directory at start-up.

To specify a directory service provider other than the default, use srv_props to set the SRV_S_DS_PROVIDER server property. The default value for SRV_S_DS_PROVIDER is platform specific, and is specified in the Open Client and Open Server Configuration Guide for your platform.

To register an Open Server application with the directory service, use srv_props to set the SRV_S_DS_REGISTER server property to CS_TRUE (the default). Setting SRV_S_DS_REGISTER to CS_FALSE prevents the registration.

Set these properties after allocating and initializing the CS_CONTEXT structure (using cs_ctx_alloc and srv_version), and before calling srv_init.

When you call srv_init, the Open Server application:

Open Server automatically uses the interfaces file as a backup directory when the directory service driver initialization fails. The srv_init call may fail to successfully access the specified directory service if any of the following occur: