Possible bug?

Here are steps to reproduce the issue we're experiencing:

1. Activate app using a valid key.2. Close the application.3. Delete the Key from LimeLM server.4. Disable internet on the host computer.5. The first time running the application (without internet) - TurboActivate.IsGenuine(0, 90, true) returns IsGenuineResult.Genuine. The second time running the application (without internet) TurboActivate.IsGenuine(0, 90, true) returns IsGenuineResult.InternetError.

See code snippet below...

IsGenuineResult gr = TurboActivate.IsGenuine(0, 90, true);this.IsLicenseValid = this.playerSettings.IsLicenced = gr == IsGenuineResult.Genuine || gr == IsGenuineResult.GenuineFeaturesChanged || gr == IsGenuineResult.InternetError;

6. After re-enabling the internet on the host computer, TurboActivate.IsGenuine(0, 90, true) always returns IsGenuineResult.InternetError.

We expect it to return IsGenuineResult.NotGenuine which would be the desired behavior.

Your feedback would be appreciated.

This isn't a bug. This is expected behavior. IsGenuineEx() is written so that it doesn't hammer the customer's network. So if it fails with an InternetError, it continues to show that InternetError (or if you're using C/C++ it shows TA_E_INET_DELAYED) for the next 5 hours.

Also, don't use 0 days for the days between checks. That forces a customer to re-contact the server every single time they start your app. It's way overkill and offers 0 benefits.

Thanks for the quick response.

Just to clarify, does this mean we can not activate or deactivate within the 5 hour window when we have internet error?

You can activate or deactivate within that 5 hour window. The "hammer protection" is only in IsGenuineEx().

Thanks a lot. Now it is clear.

Wyatt wrote:> This isn't a bug. This is expected behavior. IsGenuineEx() is written so> that it doesn't hammer the customer's network. So if it fails with an> InternetError, it continues to show that InternetError (or if you're using> C/C++ it shows TA_E_INET_DELAYED) for the next 5 hours.

Does this mean the Xojo example code is wrong?It contains this snipped:======= If gr = IsGenuineResult.InternetError Then // TODO: give the user the option to retry the genuine checking immediately // For example a dialog box. In the dialog call IsGenuine() to retry immediately End If=======

Nope, the example is correct. There's an internet error (either right then or within the last 5 hours). You should probably give the customer a direct way to re-verify. Maybe a subtle (non-intrusive) prompt that launches a dialog. And in the dialog box call IsGenuine() directly.

Ah, I see it now.The example module has it packed in one function called IsGenuine and depending on the parameters, it's using either IsGenuineEx or IsGenuine.