diff --git a/platform/src/hasp_verify.c b/platform/src/hasp_verify.c index d38abf6..623d09c 100644 --- a/platform/src/hasp_verify.c +++ b/platform/src/hasp_verify.c @@ -12,7 +12,7 @@ #include "hasp_vcode.h" #include "hasp_log.h" -#define DEFAULT_INTERVAL_S (30 * 60) +#define DEFAULT_INTERVAL_S (15 * 60) #define MAX_INTERVAL_S (24 * 60 * 60) #ifndef MIN @@ -541,10 +541,19 @@ static void *hasp_monitor_cycle(void *arg) return NULL; } + /* + * + * Whether the current session should be terminated if the expiration date of the current Feature has passed. Possible values are: + * 0 - Allow the session to continue (default). + * 1 - Terminate the session. + */ + const char *scope = "\n" + " \n" + "\n"; while (1) { hasp_handle_t handle; - hasp_status_t status = hasp_login(hasp_monitor_feature_id, (hasp_vendor_code_t)vendor_code, &handle); + hasp_status_t status = hasp_login_scope(hasp_monitor_feature_id, scope, (hasp_vendor_code_t)vendor_code, &handle); if (status != HASP_STATUS_OK) { log_hasp_status(status); diff --git a/platform/tool/hasp_monitor.c b/platform/tool/hasp_monitor.c index 8940007..6aa899a 100644 --- a/platform/tool/hasp_monitor.c +++ b/platform/tool/hasp_monitor.c @@ -8,7 +8,6 @@ static void usage(char *cmd) { fprintf(stderr, "USAGE: %s [OPTIONS]\n", cmd); fprintf(stderr, " -f -- set feature id\n"); - fprintf(stderr, " -i -- set interval second\n"); fprintf(stderr, " -h -- show help\n"); }