offline activation statusSolved

I have been playing with TurboActivate on linux and found a small problem: likely my error, but possibly a bug.

I start my test and activate the license. IsActivated shows that it is activated, IsGenuine that everything is OK. I then disconnect my machine from the net: IsActivated still shows that the license is activated, IsGenuine return TA_E_INET: all is fine.

I stop my test program, and start it again without a net connection. Now things do not work as I thought they would: - IsActivated returns non-TA_OK - IsGenuine returns TA_FAILIf I connect the net at this point, things fall back to "normal" and stay there.

Am I misusing the library? How can a find if the license has been activated if there is no network at the time of the first call to IsActivated? Related question: where is the activated-or-not status stored when the app exits?

Hey Miguel,

- IsActivated returns non-TA_OK

What exactly does it return -- TA_FAIL?

How can a find if the license has been activated if there is no network at the time of the first call to IsActivated?

IsActivated() doesn't require an internet connection, so you can use that.

Am I misusing the library?

I'd need to see the code you're using to know for sure. You can either post it here, or if it's a big chuck of code you can send it to me at wyatt@wyday.com and I'll take a look at it.

Related question: where is the activated-or-not status stored when the app exits?

It depends on what value you used for the "flags" parameter when calling CheckAndSavePKey(). If you call it with TA_USER then the cryptographically signed activation block is stored in "~/.local/", if you used TA_SYSTEM the signed block is stored in "/var/lib/.local/.".

This is the implementation of a Tcl-command 'isActivated':

static intTAtcl_isActivated( ClientData clientData, /* unused */ Tcl_Interp *interp, /* Current interpreter */ int objc, /* Number of arguments */ Tcl_Obj *const objv[] /* Argument strings */ ){ int ok; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); return TCL_ERROR; } TAtcl_GUID(interp); /* just checks that the GUID has been stored in a global */ ok = IsActivated(GUID); Tcl_SetObjResult(interp, Tcl_NewIntObj(ok == TA_OK)); fprintf(stdout, "Result was %i\n", ok); return TCL_OK;}

When I run this with an activated license and no net, I see:

mig@mtp:~/activation$ tclsh% source initLime.tcllime(guid) = xxxlime(key) = xxx/home/mig/activation/limeLM_data/TurboActivate.dat% isActivatedResult was 1 << TA_FAIL0% # turn on networking here!% isActivatedResult was 0 << TA_OK1

If I were to guess, I would say you're disabling or removing the ethernet device and that's what's causing the error. That is, the operating system no longer "sees" the ethernet or wireless hardware.

To test "offline mode" try unplugging your router instead (or unplugging your ethernet cord).

Tell me if that works.

That was a good guess, not 100% right though 🙂

I am connected to a wifi net, the computer has also an eth interface - enabled, but not connected to anything. Running NetworkManager from ubuntu repos.

1. If I just "disconnect" using the applet, behaviour is as I showed first. The OS sees both eth0 and wlan interfaces, but there is no ip assigned to any of them. The routing table is empty

2. If I unplug my wifi router, same deal

3. If I plug in my wifi router but disconnect it from the modem, behaviour is as should be. In other words, things work ok when the computer is actually connected to a network.

I'll look into this behavior.

OK, we've fixed this for TurboActivate 3.1.1 out now (get it on your API page).