int ret;
if (clientCtx == NULL) return AFB_EMPTY;
+ //if (verbose) fprintf (stderr, "ctxClientReset New uuid=[%s] token=[%s] timestamp=%d\n", clientCtx->uuid, clientCtx->token, clientCtx->timeStamp);
// Search for an existing client with the same UUID
clientCtx = ctxStoreSearch (clientCtx->uuid);
// Old token was valid let's regenerate a new one
uuid_generate(newuuid); // create a new UUID
uuid_unparse_lower(newuuid, clientCtx->token);
+
+ // keep track of time for session timeout and further clean up
+ clientCtx->timeStamp=time(NULL);
+
return (AFB_SUCCESS);
}