Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 3

"Forgetting" previous license server location


I have an application using trusted storage which can check out license rights from local trusted storage or server trusted storage.

In local trusted storage I have feature X. In server trusted storage I have a concurrent feature Y.

Before setting the server IP:
I initialize and call lc_checkout on X and it works. I call lc_checkout on Y and I get a feature doesn't exist error as I expect. I then clean everything up and end the program.

I then initialize again and this time set the location of the server using lc_set_attr(lm_job, LM_A_LICENSE_DEFAULT, (LM_A_VAL_TYPE)"@serverip").
I call lc_checkout on X and it works, then on Y and it works (lmadmin shows it is in use). I then clean everything up and end the program. lmadmin shows Y has been returned.

Now here comes the problem. The next time I run the program, I initialize, and I don't call lc_set_attr, because I want it to not be able to use the server this time. I call lc_checkout on X, works as expected. But now when I call lc_checkout on Y, it still works and lmadmin shows it is in use.

Why is it still able to use the server's available features when I didn't set the license server location the second time? How do I make it "forget" the license server exists so that it can't check out Y?

Thank you for your help.
Labels (1)
0 Kudos
(2) Replies
Level 6

I don't really know about trusted storage, so this answer is really based on certificate licensing. I assume trusted storage works in a similar way.
With license files, after a successful checkout, the license location is also stored in ~/.flexlmrc on unix, and a registry key on windows. Look at the doc for the LM_A_CKOUT_INSTALL_LIC attribute. This is how you can disable storing the license location after a checkout.
0 Kudos
Level 3

Ah yes, perfect. Thank you very much.

I found that it was stored in the registry key vendorname_LICENSE_FILE under HKEY_CURRENT_USER/Software/FLEXlm License Manager. After editing this key it was no longer able to use the server side trusted storage as expected. I will make sure to set this attribute to 0.

Thanks for your help!
0 Kudos