From f9f2c3069f721bb42f3e89304caff655eacca5ae Mon Sep 17 00:00:00 2001 From: fengjunfeng Date: Fri, 7 Jan 2022 13:53:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=89=93=E5=8D=B0=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/sentinel/license/utils/HaspUtil.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/sentinel/license/utils/HaspUtil.java b/src/main/java/com/sentinel/license/utils/HaspUtil.java index c99f1db..04d9780 100644 --- a/src/main/java/com/sentinel/license/utils/HaspUtil.java +++ b/src/main/java/com/sentinel/license/utils/HaspUtil.java @@ -101,13 +101,13 @@ public class HaspUtil { Hasp hasp = new Hasp(featureId); hasp.login(vendorCode); int status = hasp.getLastError(); - log.info("license status: {}", status); + log.info("query license status: {}", status); if(status == HaspStatus.HASP_STATUS_OK) { String licenseInfo = hasp.getSessionInfo(LICENSE_STATUS); status = hasp.getLastError(); - log.info("license status: {}", status); +// log.info("license status: {}", status); if (status != HaspStatus.HASP_STATUS_OK) { - log.error("Error: updateLicense Fails with status code :{}",status); + } return licenseInfo; }else if (status == HaspStatus.HASP_FEATURE_EXPIRED){ @@ -133,7 +133,7 @@ public class HaspUtil { Hasp hasp = new Hasp(Hasp.HASP_DEFAULT_FID); hasp.update(v2c); int status = hasp.getLastError(); - log.info("license status: {}", status); + log.info("updateLicense license status: {}", status); if (status != HaspStatus.HASP_STATUS_OK) { log.error("Error: updateLicense Fails with status code :{}",status); } @@ -151,21 +151,22 @@ public class HaspUtil { Hasp hasp = new Hasp(featureId); hasp.login(vendorCode); int status = hasp.getLastError(); - log.info("license status: {}", status); +// log.info("license status: {}", status); if(status == HaspStatus.HASP_STATUS_OK) { //如果已经安装过license ,读取指纹和 hasp id String licenseInfo = hasp.getSessionInfo(KEY_C2V_FORMAT); +// String licenseInfo = hasp.getInfo(KEY_SCOPE,KEY_C2V_FORMAT,vendorCode); status = hasp.getLastError(); - log.info("license status: {}", status); + log.info("getLicense c2v license status: {}", status); if (status != HaspStatus.HASP_STATUS_OK) { - log.error("Error: updateLicense Fails with status code :{}",status); + log.error("Error: Download Fails with status code :{}",status); } return licenseInfo; }else { hasp = new Hasp(featureId); String infos = hasp.getInfo(KEY_SCOPE, KEY_VIEW, vendorCode); status = hasp.getLastError(); - log.info("license status: {}", status); + log.info("getLicense c2v license status: {}", status); if(status != HaspStatus.HASP_STATUS_OK) { log.error("Error: getLicense c2v Fails with status code :{}",status); throw new RuntimeException(); @@ -178,7 +179,7 @@ public class HaspUtil { Hasp hasp = new Hasp(fetureId); hasp.login(vendorCode); int status = hasp.getLastError(); - log.info("license status: {}", status); + log.info("verify license status: {}", status); if(status != HaspStatus.HASP_STATUS_OK) { log.error("Error: license login Fails with status code :{}",status); }