VLSgetLeaderServerName

Syntax

int VLSgetLeaderServerName (	 	 
char	 	*leader_name, 
int          	 	leader_name_len );
Argument Description

leader_name

The hostname of the current License Manager leader. Space to be allocated by the caller.

leader_name_len Size of leader_name.

Description

Returns the hostname of the current License Manager leader, as a null-terminated string, into the buffer specified by the leader_name parameter.

The License Manager to be contacted is selected by the VLSgetContactServer call. So, the VLSgetContactServer function must be called before VLSgetLeaderServerName.

Returns

The status code LS_SUCCESS is returned if successful.Otherwise, it will return the following error codes:

Error Code

Description

VLS_CALLING_ERROR

leader_name is NULL

leadername_len is NULL.

LS_BUFFER_TOO_SMALL

leadername_len is smaller than the License Manager name that will be returned.

VLS_NON_REDUNDANT_SRVR

License Manager is non-redundant and therefore cannot support this redundancy-related operation.

VLS_LEADER_NOT_PRESENT

Unknown leader.

VLS_SERVER_SYNC_IN_PROGRESS

License Manager synchronization in process.

VLS_NON_REDUNDANT_FEATURE

Feature is non-redundant and thus cannot be used in this redundancy-related operation.

VLS_DIFF_LIB_VER

Version mismatch between License Manager API and client API.

VLS_NO_SERVER_RUNNING

License Manager on specified host is not available for processing the license operation requests.

VLS_HOST_UNKNOWN

Invalid hostName is specified.

VLS_BAD_SERVER_MESSAGE

Message returned by the License Manager could not be understood.

LS_NO_NETWORK

Generic error indicating that the network is unavailable in servicing license operation.

LS_NORESOURCES

An error occurred in attempting to allocate memory needed by this function.

LS_UNRESOLVED_IP_ADDRESS

IP address given is not correct.

LS_BAD_PARAMETER

License Manager’s name is NULL or an empty string.

For a complete list of the error codes, see Licensing Library Error and Result Codes.