From f1d283e941680a97d74a2fb7f6bcdd9490efc394 Mon Sep 17 00:00:00 2001
From: nancy.liao <huihui.liao@greentest.com.cn>
Date: 周四, 29 5月 2025 18:14:27 +0800
Subject: [PATCH] 根据具体需求 修改了一个强制性的版本匹配,否则license返回结果不正确

---
 src/library/hw_identifier/identification_strategy.cpp |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/library/hw_identifier/identification_strategy.cpp b/src/library/hw_identifier/identification_strategy.cpp
index 273c670..38233d0 100644
--- a/src/library/hw_identifier/identification_strategy.cpp
+++ b/src/library/hw_identifier/identification_strategy.cpp
@@ -22,8 +22,7 @@
 	return result;
 }
 
-FUNCTION_RETURN IdentificationStrategy::identify_pc(HwIdentifier& pc_id) const {
-	vector<array<uint8_t, HW_IDENTIFIER_PROPRIETARY_DATA>> data;
+FUNCTION_RETURN IdentificationStrategy::generate_pc_id(HwIdentifier& pc_id) const {
 	const vector<HwIdentifier> available_ids = alternative_ids();
 	FUNCTION_RETURN result = FUNC_RET_NOT_AVAIL;
 	if (available_ids.size() > 0) {
@@ -33,7 +32,7 @@
 	return result;
 }
 
-std::unique_ptr<IdentificationStrategy> IdentificationStrategy::get_strategy(LCC_API_IDENTIFICATION_STRATEGY strategy) {
+std::unique_ptr<IdentificationStrategy> IdentificationStrategy::get_strategy(LCC_API_HW_IDENTIFICATION_STRATEGY strategy) {
 	unique_ptr<IdentificationStrategy> result;
 	switch (strategy) {
 		case STRATEGY_DEFAULT:
@@ -45,11 +44,8 @@
 		case STRATEGY_IP_ADDRESS:
 			result = unique_ptr<IdentificationStrategy>(dynamic_cast<IdentificationStrategy*>(new Ethernet(true)));
 			break;
-		case STRATEGY_DISK_NUM:
-			result = unique_ptr<IdentificationStrategy>(dynamic_cast<IdentificationStrategy*>(new DiskStrategy(true)));
-			break;
-		case STRATEGY_DISK_LABEL:
-			result = unique_ptr<IdentificationStrategy>(dynamic_cast<IdentificationStrategy*>(new DiskStrategy(false)));
+		case STRATEGY_DISK:
+			result = unique_ptr<IdentificationStrategy>(dynamic_cast<IdentificationStrategy*>(new DiskStrategy()));
 			break;
 		default:
 			throw logic_error("strategy not supported");

--
Gitblit v1.9.1