cancel
Showing results for 
Search instead for 
Did you mean: 

How to Acquire and Return a License from the Local License Server

No ratings

How to Acquire and Return a License from the Local License Server

Summary

This article will explore the process of acquiring and then returning a license to a local license server

Synopsis

When moving from FlexNet Publisher(FNP) to FlexNet Embedded(FNE) it is sometimes not clear on how performing a checkout(acquire) against a local license server is performed. With FNP it was a simple process of using the lc_checkout call to get the license from the license server, however with FNE this is not the case.

This article will explore the process of getting(acquiring) a license from the local FNE server and then returning it.

Discussion

When acquiring a license from the local FNE server it is first required that a capability request is performed against the server in order to get a response into trusted storage on the client containing the license. The client would then perform the acquire against the license that is now held in the local trusted store.

This behaviour is demonstrated in the example capability request example that is provided in the FNE toolkits:

FlxCapabilityRequestAddRightsId(capabilityRequest, "captest1", 1, error);

/* find binary capability request size */
if ( !FlxPublisherGenerateCapabilityRequest(
clientObjects->publisher,
clientObjects->identity,
capabilityRequest,
*binaryRequest,
binaryRequestSize,
error) )
{
..
..
..
process the response
..
..
..
!FlxPublisherAcquireLicenses(
clientObjects->publisher,
&license,
clientObjects->licenseSources,
survey,
version,
1,
0,
0,
error) )

To return the license you would need to perform the capabaility request again but instead of asking for licenses you would pass in a count of 0 to the request so that all licenses are returned:

FlxCapabilityRequestAddRightsId(capabilityRequest, "captest1", 0, error);
Labels (1)
Was this article helpful? Yes No