sntl_lmadmin_context_new
Library Information
>This API belongs to the License Manager administration library.
>The corresponding header is lmadmin.h.
Description
Creates the admin context object with the specified attributes.
Syntax
SNTL_DECLARE(sntl_lmadmin_status_t) sntl_lmadmin_context_new (const char *server_name,
unsigned int server_port,
sntl_lmadmin_attr_t *attr,
sntl_lmadmin_context_t **admin_context);
Argument | Description |
---|---|
server_name [in] | This attribute is used to set the contact server from where client sessions will be terminated. Name of the contact server to be specified as NULL, localhost, or loopback address. By default, 'localhost' is used. |
server_port [in] | This attribute is used to set the server port where the server is running. Provide 0 to pass the default server_port. By default, the server_port used is '5093'. |
attr [in] |
Pointer to the attribute object . This is an optional attribute. The attributes that can be set are described below. Pass NULL to apply default attribute settings. |
admin_context [out] |
Pointer to the admin context object created. Memory resources are allocated by this API and released using the sntl_lmadmin_context_delete API. |
Attributes
The table below provides details about the attributes that can be set:
# | Attribute for... | Key and Description |
---|---|---|
1 | Setting the Network Timeout Interval |
> Attribute Key - SNTL_ATTR_LMADMINCONTEXT_NETWORK_TIMEOUT >This attribute is used for setting the network timeout interval (in seconds) for communication between the admin application and the License Manager. For example, an admin application sends a request to the License Manager and the License Manager does not respond. In this scenario, error SNTL_LMADMIN_NO_SERVER_RUNNING is returned, after the application has waited for the interval period that is set. >The default value for the interval is 30 seconds. |
Returns
The status code SNTL_LMADMIN_SUCCESS is returned, if successful. Otherwise, a specific status code is returned indicating the reason for failure.
For the complete list of error codes, refer to LmAdmin Library Error and Result Codes.